:root {
    --login-ink: #132235;
    --login-muted: #728197;
    --login-blue: #155dcc;
    --login-line: #dfe7f1;
    --login-ease: cubic-bezier(.2, .8, .2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    color-scheme: light;
}

body.login-premium {
    min-height: 100vh;
    margin: 0;
    padding: clamp(16px, 3vw, 42px);
    display: grid;
    place-items: center;
    overflow-x: hidden;
    direction: rtl;
    color: var(--login-ink);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    background: 
        radial-gradient(circle at 18% 16%, rgba(41, 130, 255, .24), transparent 28rem),
        radial-gradient(circle at 86% 86%, rgba(0, 190, 255, .12), transparent 25rem),
        #061528;
}

body.login-premium #pwaInstallButton {
    display: none !important;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-delay-notice {
    margin: 12px 0 0;
    color: #795207;
    font-size: .9rem;
    line-height: 1.8;
    text-align: center;
}

.login-delay-notice[hidden] {
    display: none;
}

.skip-link {
    position: fixed;
    z-index: 20;
    top: 12px;
    right: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    color: #fff;
    background: var(--login-blue);
    transform: translateY(-150%);
    transition: transform .18s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.login-page {
    width: min(1420px, 100%);
    position: relative;
}

.login-shell {
    min-height: min(820px, calc(100vh - clamp(32px, 6vw, 84px)));
    display: grid;
    grid-template-columns: minmax(390px, .72fr) minmax(600px, 1.38fr);
    grid-template-areas: "form image";
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 34px;
    background: #fff;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .42), 0 1px 0 rgba(255, 255, 255, .22) inset;
}

.login-form-side {
    grid-area: form;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(42px, 5vw, 78px);
    background: linear-gradient(145deg, #fff 0%, #f9fbfe 100%);
    position: relative;
}

.login-form-side::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #d7a514, #1665d8 58%, #39a9ef);
}

.login-form-card {
    width: min(390px, 100%);
}

.login-mark {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 38px;
    direction: ltr;
    font-family: Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -.06em;
}

.login-mark span {
    color: #1560c7;
}

.login-mark b {
    color: #111923;
    font-weight: 900;
}

.login-title {
    margin: 0 0 32px;
    color: var(--login-ink);
    font-size: clamp(2.1rem, 4vw, 3rem);
    font-weight: 950;
    letter-spacing: -.06em;
    line-height: 1.15;
}

.alert-modern {
    margin: -12px 0 22px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border-radius: 13px;
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.7;
}

.alert-modern i {
    margin-top: 4px;
}

.alert-modern.danger {
    color: #9f211b;
    border: 1px solid #fecaca;
    background: #fff5f5;
}

.alert-modern.success {
    color: #086b47;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
}

.field-group {
    margin-bottom: 19px;
}

.field-label {
    display: block;
    margin: 0 3px 8px;
    color: #26384d;
    font-size: .83rem;
    font-weight: 850;
}

.field-wrap {
    position: relative;
}

.field-input {
    width: 100%;
    height: 59px;
    padding: 0 52px;
    border: 1px solid var(--login-line);
    border-radius: 16px;
    outline: 0;
    color: #15253a;
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field-input::placeholder {
    color: #a1acbb;
}

.field-input:hover {
    border-color: #b7c8da;
    background: #fff;
}

.field-input:focus {
    border-color: #4f82e8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .11), 0 12px 26px rgba(15, 23, 42, .06);
}

.field-icon {
    position: absolute;
    z-index: 1;
    right: 11px;
    top: 50%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #67809b;
    background: #eef3f8;
    transform: translateY(-50%);
    transition: color .18s ease, background .18s ease;
}

.field-wrap:focus-within .field-icon {
    color: var(--login-blue);
    background: #eaf2ff;
}

.field-toggle {
    position: absolute;
    z-index: 2;
    left: 9px;
    top: 50%;
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: #667085;
    background: transparent;
    transform: translateY(-50%);
}

.field-toggle:hover,
.field-toggle:focus-visible {
    color: var(--login-blue);
    background: #edf4ff;
    outline: 0;
}

.caps-lock-hint {
    margin: 8px 3px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b45309;
    font-size: .74rem;
    font-weight: 750;
}

.caps-lock-hint[hidden] {
    display: none;
}

.btn-login {
    width: 100%;
    height: 61px;
    margin-top: 13px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(105deg, #102a46 0%, #174ca0 55%, #1675d1 100%);
    box-shadow: 0 16px 34px rgba(23, 76, 160, .27);
    transition: transform .18s var(--login-ease), box-shadow .18s ease, filter .18s ease;
}

.btn-login::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .2), transparent 70%);
    transform: translateX(115%);
    transition: transform .6s var(--login-ease);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(23, 76, 160, .34);
    filter: saturate(1.08);
}

.btn-login:hover::before {
    transform: translateX(-115%);
}

.btn-login:active {
    transform: translateY(0) scale(.992);
}

.btn-login:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 3px;
}

.btn-login:disabled,
.btn-login[aria-disabled="true"] {
    cursor: wait;
    opacity: .8;
    transform: none;
}

.btn-login-label {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: .93rem;
    font-weight: 900;
}

.btn-login-label > i {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .14);
}

.showcase-side {
    grid-area: image;
    min-width: 0;
    min-height: 700px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    background: #d9d7d0 url('/assets/images/login-showcase.png') 95% center / auto 100% no-repeat;
}

.showcase-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(4, 18, 34, .03) 18%, rgba(4, 18, 34, .12) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 44%, rgba(1, 13, 28, .24));
}

.showcase-brand {
    position: absolute;
    top: 29px;
    left: 31px;
    z-index: 2;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 12px;
    color: #1262c6;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 14px 32px rgba(20, 50, 80, .12);
    direction: ltr;
    font-family: Arial, sans-serif;
    font-size: .96rem;
    font-weight: 900;
    letter-spacing: -.04em;
    backdrop-filter: blur(8px);
}

.showcase-brand span {
    color: #111923;
}

.showcase-caption {
    position: absolute;
    right: 42px;
    bottom: 39px;
    z-index: 2;
    display: grid;
    gap: 4px;
    direction: ltr;
    color: #fff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .38);
}

.showcase-line {
    width: 76px;
    height: 4px;
    margin-bottom: 5px;
    border-radius: 99px;
    background: linear-gradient(90deg, #e0ad23, #fff0a1);
}

.showcase-caption strong {
    font-family: Arial, sans-serif;
    font-size: clamp(1.9rem, 4vw, 3.65rem);
    font-weight: 900;
    letter-spacing: -.08em;
    line-height: .95;
}

.showcase-caption strong b {
    color: #e1b332;
}

.showcase-caption small {
    font-family: Arial, sans-serif;
    font-size: clamp(.78rem, 1.4vw, 1.15rem);
    font-weight: 700;
    letter-spacing: .36em;
}

.showcase-shine {
    position: absolute;
    inset: -30% auto -30% -25%;
    z-index: 1;
    width: 32%;
    opacity: .18;
    pointer-events: none;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .8), transparent);
    transform: rotate(18deg);
    animation: imageShine 9s ease-in-out infinite;
}

@keyframes imageShine {
    0%, 35% { transform: translateX(-160%) rotate(18deg); }
    65%, 100% { transform: translateX(470%) rotate(18deg); }
}

@media (max-width: 1050px) {
    body.login-premium {
        padding: 18px;
    }

    .login-shell {
        grid-template-columns: minmax(350px, .78fr) minmax(490px, 1.22fr);
        min-height: min(760px, calc(100vh - 36px));
    }

    .showcase-side {
        min-height: 640px;
    }
}

@media (max-width: 820px) {
    body.login-premium {
        width: 100%;
        padding: 0;
        place-items: stretch;
        background: #fff;
        overflow-x: hidden;
    }

    .login-page,
    .login-shell {
        width: 100%;
        min-width: 0;
    }

    .login-shell {
        width: 100vw;
        max-width: 100vw;
        min-height: 100vh;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 270px 1fr;
        grid-template-areas: "image" "form";
        border: 0;
        border-radius: 0;
    }

    .showcase-side {
        min-height: 0;
        background-position: center center;
        background-size: cover;
    }

    .showcase-brand {
        top: 20px;
        left: 20px;
    }

    .showcase-caption {
        right: 24px;
        bottom: 22px;
    }

    .login-form-side {
        width: 100vw;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 46px clamp(24px, 8vw, 64px) 36px;
    }

    .login-form-card {
        width: min(100%, 390px);
        min-width: 0;
        margin-inline: auto;
    }
}

@media (max-width: 520px) {
    .login-shell {
        grid-template-rows: 220px 1fr;
    }

    .showcase-brand {
        top: 16px;
        left: 16px;
        padding: 8px 11px;
        font-size: .82rem;
    }

    .showcase-caption {
        right: 18px;
        bottom: 18px;
    }

    .showcase-caption strong {
        font-size: 2rem;
    }

    .showcase-caption small {
        font-size: .7rem;
    }

    .login-form-side {
        padding: 38px 20px 25px;
        align-items: flex-start;
    }

    .login-mark {
        margin-bottom: 29px;
    }

    .login-title {
        margin-bottom: 28px;
        font-size: 2.15rem;
    }

    .field-input {
        height: 56px;
        font-size: .9rem;
    }

    .btn-login {
        height: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
