
/* =========================================================
   LOGIN PAGE — PREMIUM CINEMATIC DESIGN
   Rohullah Sadat | Accounts App
========================================================= */

.login-page {
    --login-text: #f1f5f9;
    --login-muted: #94a3b8;
    --login-border: rgba(148, 163, 184, .16);
    --login-primary: #6366f1;
    --login-secondary: #06b6d4;
    --login-danger: #fb7185;

    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    animation: loginReveal .65s cubic-bezier(.2, .8, .2, 1) both;
}

.login-card {
    position: relative;
    width: min(100%, 510px);
    padding: 46px;
    overflow: hidden;
    border: 1px solid var(--login-border);
    border-radius: 25px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(99, 102, 241, .15), transparent 40%),
        rgba(17, 25, 45, .86);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, .38),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 14%;
    right: 14%;
    height: 2px;
    border-radius: 50%;
    background: linear-gradient(
        90deg,
        transparent,
        #6366f1,
        #06b6d4,
        transparent
    );
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 23px;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6 55%, #0891b2);
    color: #fff;
    font-size: 28px;
    box-shadow:
        0 13px 35px rgba(99, 102, 241, .32),
        inset 0 1px 0 rgba(255, 255, 255, .25);
}

.login-header h1 {
    margin: 0 0 12px;
    color: var(--login-text);
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: -.7px;
}

.login-header p {
    max-width: 360px;
    margin: 0 auto;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.9;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 23px;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.login-form .form-group label {
    color: #dbeafe;
    font-size: 13px;
    font-weight: 650;
}

.login-form .form-group input {
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--login-border);
    border-radius: 13px;
    outline: none;
    background: rgba(255, 255, 255, .045);
    color: var(--login-text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.login-form .form-group input::placeholder {
    color: #64748b;
}

.login-form .form-group input:hover {
    border-color: rgba(129, 140, 248, .45);
    background: rgba(255, 255, 255, .065);
}

.login-form .form-group input:focus {
    border-color: var(--login-primary);
    background: rgba(99, 102, 241, .075);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .14);
}

.login-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-form .input-wrapper > i:first-child {
    position: absolute;
    inset-inline-start: 16px;
    z-index: 2;
    color: #818cf8;
    font-size: 15px;
    pointer-events: none;
}

.login-form .input-wrapper input {
    padding-inline-start: 45px;
    padding-inline-end: 45px;
}

.login-form .password-toggle {
    position: absolute;
    inset-inline-end: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.login-form .password-toggle:hover {
    color: #c4b5fd;
    background: rgba(129, 140, 248, .12);
}

.login-form .field-error {
    color: var(--login-danger);
    font-size: 12px;
    line-height: 1.6;
}

.login-errors {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(251, 113, 133, .25);
    border-radius: 12px;
    background: rgba(251, 113, 133, .08);
    color: #fda4af;
    font-size: 13px;
    line-height: 1.8;
}

.login-errors ul {
    margin: 0;
    padding-inline-start: 18px;
}

.login-options {
    display: flex;
    justify-content: flex-end;
    margin-top: -9px;
}

.login-options a {
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease;
}

.login-options a:hover {
    color: #67e8f9;
}

.login-submit {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 3px;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(110deg, #4f46e5, #7c3aed 52%, #0891b2);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(79, 70, 229, .25);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.login-submit::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    transform: translateX(-110%);
    background: linear-gradient(
        100deg,
        transparent,
        rgba(255, 255, 255, .2),
        transparent
    );
    transition: transform .65s ease;
}

.login-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 17px 35px rgba(79, 70, 229, .36);
    filter: saturate(1.15);
}

.login-submit:hover::before {
    transform: translateX(110%);
}

.login-submit i {
    font-size: 14px;
    transition: transform .25s ease;
}

.login-submit:hover i {
    transform: translateX(4px);
}

html[dir="rtl"] .login-submit:hover i {
    transform: translateX(-4px);
}

.login-submit:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.login-footer {
    margin-top: 29px;
    padding-top: 22px;
    border-top: 1px solid var(--login-border);
    text-align: center;
}

.login-footer p {
    margin: 0;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.9;
}

.login-footer a {
    margin-inline-start: 5px;
    color: #a5b4fc;
    font-weight: 750;
    text-decoration: none;
    transition: color .2s ease;
}

.login-footer a:hover {
    color: #67e8f9;
}

.login-form input:focus-visible,
.login-submit:focus-visible,
.login-form .password-toggle:focus-visible,
.login-footer a:focus-visible,
.login-options a:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 3px;
}

@keyframes loginReveal {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .login-card {
        padding: 33px 23px;
        border-radius: 20px;
    }

    .login-header {
        margin-bottom: 29px;
    }

    .login-icon {
        width: 66px;
        height: 66px;
        border-radius: 20px;
        font-size: 24px;
    }

    .login-form {
        gap: 20px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 27px 17px;
    }

    .login-header h1 {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-page {
        animation: none;
    }

    .login-page *,
    .login-page *::before,
    .login-page *::after {
        transition-duration: .01ms !important;
    }
}
