@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

.login-identity-page {
    min-height: 100vh;
    background: #1a0b2e !important;
    color: #f8fafc;
    position: relative;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    overflow-x: clip;
    margin: 0 !important;
}

html[lang="ar"] .login-identity-page {
    font-family: 'Alexandria', 'Plus Jakarta Sans', system-ui, sans-serif;
}

.login-identity-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #2d1b4e 0%, rgba(136, 27, 225, 0.08) 42%, #1a0b2e 100%);
    z-index: 0;
}

.login-identity-page::after {
    content: "";
    position: fixed;
    right: -140px;
    bottom: -140px;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: rgba(236, 27, 177, 0.14);
    filter: blur(64px);
    z-index: 0;
}

.login-identity-page .custom-login,
.login-identity-page .custom-login-inner,
.login-identity-page .custom-wrapper,
.login-identity-page .custom-row {
    position: relative;
    z-index: 1;
}

.login-identity-page .custom-login {
    width: 100%;
    min-height: 100vh;
}

.login-identity-page .auth-stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.login-identity-page .auth-stars span {
    position: absolute;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    animation: auth-star-twinkle 3.2s ease-in-out infinite, auth-star-drift 9s ease-in-out infinite;
}

.login-identity-page .auth-cursor-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
}

.login-identity-page .auth-cursor-glow-1 {
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
            rgba(236, 27, 177, 0.12),
            rgba(136, 27, 225, 0.07) 40%,
            transparent 70%);
}

.login-identity-page .auth-cursor-glow-2 {
    background: radial-gradient(540px circle at var(--mx2, 50%) var(--my2, 50%),
            rgba(136, 27, 225, 0.09),
            rgba(236, 27, 177, 0.05) 44%,
            transparent 72%);
    opacity: 0.9;
}

.login-identity-page .auth-cursor-glow-3 {
    background: radial-gradient(720px circle at var(--mx3, 50%) var(--my3, 50%),
            rgba(235, 228, 72, 0.06),
            rgba(136, 27, 225, 0.03) 46%,
            transparent 75%);
    opacity: 0.75;
}

.login-identity-page .auth-stars span:nth-child(2) { animation-duration: 2.5s; animation-delay: 0.4s; color: rgba(196, 181, 253, 0.45); }
.login-identity-page .auth-stars span:nth-child(3) { animation-duration: 3.8s; animation-delay: 0.9s; color: rgba(244, 114, 182, 0.4); }
.login-identity-page .auth-stars span:nth-child(4) { animation-duration: 2.8s; animation-delay: 0.2s; }
.login-identity-page .auth-stars span:nth-child(5) { animation-duration: 3.6s; animation-delay: 0.6s; }
.login-identity-page .auth-stars span:nth-child(6) { animation-duration: 2.9s; animation-delay: 0.7s; }
.login-identity-page .auth-stars span:nth-child(7) { animation-duration: 3.3s; animation-delay: 0.3s; }
.login-identity-page .auth-stars span:nth-child(8) { animation-duration: 2.7s; animation-delay: 1.1s; }
.login-identity-page .auth-stars span:nth-child(9) { animation-duration: 3.4s; animation-delay: 0.5s; }
.login-identity-page .auth-stars span:nth-child(10) { animation-duration: 2.6s; animation-delay: 0.8s; }
.login-identity-page .auth-stars span:nth-child(11) { animation-duration: 3.7s; animation-delay: 0.9s; }
.login-identity-page .auth-stars span:nth-child(12) { animation-duration: 2.9s; animation-delay: 0.4s; }
.login-identity-page .auth-stars span:nth-child(13) { animation-duration: 3.1s; animation-delay: 1.2s; }
.login-identity-page .auth-stars span:nth-child(14) { animation-duration: 2.8s; animation-delay: 0.3s; }
.login-identity-page .auth-stars span:nth-child(15) { animation-duration: 3.6s; animation-delay: 0.7s; }
.login-identity-page .auth-stars span:nth-child(16) { animation-duration: 2.5s; animation-delay: 1s; }

@keyframes auth-star-twinkle {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.08); }
}

@keyframes auth-star-drift {
    0%, 100% { margin-top: 0; margin-left: 0; }
    50% { margin-top: -3px; margin-left: 2px; }
}

.login-identity-page .auth-stars .shooting-star {
    position: absolute;
    display: block;
    width: 120px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(236, 27, 177, 0.9), rgba(255, 255, 255, 0));
    transform: rotate(-25deg);
    filter: drop-shadow(0 0 8px rgba(236, 27, 177, 0.55));
    opacity: 0;
    animation: auth-shooting-star 8s linear infinite;
}

.login-identity-page .auth-stars .shooting-star-1 {
    top: 18%;
    left: -12%;
    animation-delay: 0s;
}

.login-identity-page .auth-stars .shooting-star-2 {
    top: 42%;
    left: -18%;
    width: 92px;
    animation-delay: 2.8s;
}

.login-identity-page .auth-stars .shooting-star-3 {
    top: 9%;
    left: -20%;
    width: 110px;
    animation-delay: 5.4s;
}

@keyframes auth-shooting-star {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) rotate(-25deg);
    }
    8% {
        opacity: 1;
    }
    28% {
        opacity: 0.9;
    }
    40% {
        opacity: 0;
        transform: translateX(115vw) translateY(34vh) rotate(-25deg);
    }
    100% {
        opacity: 0;
        transform: translateX(115vw) translateY(34vh) rotate(-25deg);
    }
}

.login-identity-page .custom-login-inner {
    width: 100%;
    min-height: 100vh;
}

.login-identity-page .login-bg-img,
.login-identity-page .bg-login,
.login-identity-page .dash-header {
    display: none !important;
}

.login-identity-page .custom-wrapper {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 20px;
    width: 100%;
}

.login-identity-page .custom-row {
    width: 100%;
    max-width: 518px;
    margin: 0 auto;
}

.login-identity-page .card {
    background: rgba(20, 15, 35, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 80px 50px rgba(236, 27, 177, 0.1) !important;
    overflow: hidden;
    width: 100%;
}

.login-identity-page .card-body {
    padding: 32px !important;
}

.login-identity-page .auth-compact-card {
    min-height: 460px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-identity-page .auth-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.1rem;
    border-radius: 1rem;
    background: rgba(136, 27, 225, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.35);
}

.login-identity-page .auth-brand-accent {
    height: 3px;
    width: 3.25rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #f472b6, #c084fc);
    margin: 0.75rem auto 1rem auto;
}

.login-identity-page .auth-page-head h2 {
    font-size: 32px;
    line-height: 1.2;
}

.login-identity-page .auth-page-head .text-muted {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.login-identity-page .form-label,
.login-identity-page h2 {
    color: #fff !important;
}

.login-identity-page .custom-login-form {
    margin-top: 10px;
    width: 100%;
    text-align: left;
}

.login-identity-page #loginAjaxMessage:empty {
    display: none;
}

.login-identity-page .form-group {
    margin-bottom: 18px !important;
    width: 100%;
}

.login-identity-page .form-group > .form-label {
    display: block;
    margin-bottom: 8px !important;
}

.login-identity-page .password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px !important;
}

.login-identity-page .text-muted {
    color: rgba(156, 163, 175, 0.95) !important;
}

.login-identity-page .forgot-link {
    color: #ec1bb1 !important;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.2;
}

.login-identity-page .forgot-link:hover {
    text-decoration: underline;
}

.login-identity-page .form-control {
    display: block !important;
    width: 100% !important;
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    border-radius: 16px !important;
    padding: 0 16px !important;
    height: 56px !important;
    line-height: 56px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-identity-page .form-group:first-child {
    margin-bottom: 20px !important;
}

.login-identity-page .form-control::placeholder {
    color: #6b7280;
}

.login-identity-page .form-control:focus {
    border-color: rgba(136, 27, 225, 0.6) !important;
    box-shadow: none !important;
}

.login-identity-page .btn-primary {
    background: linear-gradient(90deg, #881BE1 0%, #EC1BB1 100%) !important;
    border: 0 !important;
    border-radius: 9999px !important;
    font-weight: 700;
    min-height: 54px;
    font-size: 16px;
    box-shadow: 0 0 30px 8px rgba(255, 255, 255, 0.15), 0 0 60px 15px rgba(236, 27, 177, 0.3);
}

.login-identity-page .d-grid {
    display: block !important;
    width: 100% !important;
}

.login-identity-page .d-grid #loginSubmitBtn,
.login-identity-page #loginSubmitBtn.btn.btn-primary,
.login-identity-page .d-grid #forgotSubmitBtn,
.login-identity-page #forgotSubmitBtn.btn.btn-primary,
.login-identity-page .d-grid #resetBtn,
.login-identity-page #resetBtn.btn.btn-primary {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    margin-top: 10px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: 54px !important;
    line-height: 54px !important;
    padding: 0 22px !important;
    border-radius: 9999px !important;
    text-align: center !important;
    letter-spacing: 0.2px;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #fff !important;
    cursor: pointer;
    background: linear-gradient(90deg, #881BE1 0%, #EC1BB1 100%) !important;
    border: 0 !important;
    box-shadow: 0 0 30px 8px rgba(255, 255, 255, 0.15), 0 0 60px 15px rgba(236, 27, 177, 0.3) !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
}

.login-identity-page #loginSubmitBtn:hover {
    filter: brightness(1.04);
}

.login-identity-page #forgotSubmitBtn:hover,
.login-identity-page #resetBtn:hover {
    filter: brightness(1.04);
}

.login-identity-page #loginSubmitBtn:active,
.login-identity-page #forgotSubmitBtn:active,
.login-identity-page #resetBtn:active {
    transform: scale(0.995);
}

.login-identity-page [dir="rtl"] .password-row,
html[dir="rtl"] .login-identity-page .password-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .login-identity-page .custom-login-form {
    text-align: right;
}

.login-identity-page footer {
    display: block !important;
    position: relative;
    z-index: 1;
    padding-bottom: 14px;
}

.login-identity-page footer .auth-footer {
    background: transparent !important;
    border: 0 !important;
}

.login-identity-page footer .auth-footer span {
    color: rgba(203, 213, 225, 0.82);
    font-size: 13px;
}

.login-identity-page .auth-alert-danger {
    background: rgba(127, 29, 29, 0.38);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.login-identity-page .auth-back-link {
    color: rgba(203, 213, 225, 0.9);
}

.login-identity-page .auth-back-link a {
    color: #ebe448 !important;
    font-weight: 700;
}

@media (max-width: 576px) {
    .login-identity-page .card-body {
        padding: 24px !important;
    }

    .login-identity-page .auth-compact-card {
        min-height: auto;
    }

    .login-identity-page .custom-wrapper {
        min-height: calc(100vh - 56px);
        padding: 20px 12px 12px;
    }

    .login-identity-page .form-control {
        height: 52px !important;
        line-height: 52px !important;
    }

    .login-identity-page .d-grid #loginSubmitBtn,
    .login-identity-page #loginSubmitBtn.btn.btn-primary,
    .login-identity-page .d-grid #forgotSubmitBtn,
    .login-identity-page #forgotSubmitBtn.btn.btn-primary,
    .login-identity-page .d-grid #resetBtn,
    .login-identity-page #resetBtn.btn.btn-primary {
        height: 52px !important;
        line-height: 52px !important;
        font-size: 16px !important;
    }

    .login-identity-page .auth-page-head h2 {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-identity-page .auth-stars span {
        animation: none;
        opacity: 0.45;
    }
    .login-identity-page .auth-stars .shooting-star {
        display: none;
        animation: none !important;
    }
    .login-identity-page .auth-cursor-glow {
        display: none;
    }
}
