@font-face {
    font-family: "Vazirmatn";
    src: url("../../tenant/frontend/fonts/webfonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../../tenant/frontend/fonts/webfonts/Vazirmatn-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../../tenant/frontend/fonts/webfonts/Vazirmatn-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --auth-accent: #ff7a45;
    --auth-accent-strong: #ff5f24;
    --auth-ink: #f8fbff;
    --auth-muted: #b8c2d4;
    --auth-line: rgba(255, 255, 255, .14);
    --auth-panel: rgba(8, 17, 35, .72);
}

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

html, body { min-height: 100%; }

body {
    margin: 0;
    min-width: 320px;
    background: #060d1c;
    color: var(--auth-ink);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; }

.jeldsaz-auth {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    padding: 104px clamp(24px, 5vw, 84px) 64px;
}

.jeldsaz-auth__media,
.jeldsaz-auth__shade {
    position: fixed;
    inset: 0;
    z-index: -4;
}

.jeldsaz-auth__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    filter: saturate(.9) contrast(1.08);
}

.jeldsaz-auth__shade {
    z-index: -3;
    background:
        linear-gradient(90deg, rgba(3, 10, 23, .64), rgba(5, 12, 27, .34) 48%, rgba(3, 9, 20, .68)),
        linear-gradient(180deg, rgba(3, 9, 20, .22), rgba(3, 9, 20, .7));
}

.jeldsaz-auth__glow {
    position: fixed;
    z-index: -2;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.jeldsaz-auth__glow--one {
    top: -180px;
    right: -100px;
    background: rgba(255, 100, 43, .2);
}

.jeldsaz-auth__glow--two {
    left: 25%;
    bottom: -280px;
    background: rgba(37, 99, 235, .2);
}

.jeldsaz-auth__brand {
    position: absolute;
    z-index: 2;
    top: 30px;
    right: clamp(24px, 5vw, 84px);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.jeldsaz-auth__brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 15px;
    background: linear-gradient(145deg, var(--auth-accent), var(--auth-accent-strong));
    box-shadow: 0 12px 30px rgba(255, 95, 36, .26);
    font-size: 25px;
    font-weight: 800;
}

.jeldsaz-auth__brand strong,
.jeldsaz-auth__brand small { display: block; }
.jeldsaz-auth__brand strong { font-size: 21px; line-height: 1.25; font-weight: 800; }
.jeldsaz-auth__brand small { margin-top: 2px; color: #cbd3df; font-size: 11px; letter-spacing: .02em; }

.jeldsaz-auth__frame {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 460px);
    align-items: center;
    gap: clamp(52px, 7vw, 118px);
    width: min(100%, 1320px);
    margin: auto;
    direction: ltr;
}

.jeldsaz-auth__hero,
.jeldsaz-auth__panel { direction: rtl; }

.jeldsaz-auth__hero {
    grid-column: 1;
    max-width: 720px;
    text-align: right;
}

.jeldsaz-auth__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    color: #dce4ef;
    font-size: 14px;
    font-weight: 600;
}

.jeldsaz-auth__eyebrow i {
    width: 28px;
    height: 2px;
    border-radius: 9px;
    background: var(--auth-accent);
    box-shadow: 0 0 16px rgba(255, 122, 69, .75);
}

.jeldsaz-auth__hero h1 {
    margin: 0;
    max-width: 720px;
    color: #fff;
    font-size: clamp(42px, 4.2vw, 64px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.04em;
    text-shadow: 0 10px 36px rgba(0, 0, 0, .3);
}

.jeldsaz-auth__hero h1 em {
    position: relative;
    color: #ff9a6d;
    font-style: normal;
    white-space: nowrap;
}

.jeldsaz-auth__hero h1 em::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 58%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--auth-accent));
}

.jeldsaz-auth__hero p {
    max-width: 590px;
    margin: 24px 0 0;
    color: #c7d0de;
    font-size: 16px;
    line-height: 2;
}

.jeldsaz-auth__benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.jeldsaz-auth__benefits span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #e7edf6;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.jeldsaz-auth__benefits b { color: #ff9669; }

.jeldsaz-auth__panel {
    grid-column: 2;
    width: 100%;
    padding: clamp(28px, 3.5vw, 44px);
    border: 1px solid var(--auth-line);
    border-radius: 28px;
    background: linear-gradient(155deg, rgba(15, 27, 50, .88), var(--auth-panel));
    box-shadow: 0 34px 80px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.jeldsaz-auth__panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.jeldsaz-auth__panel-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 137, 87, .3);
    border-radius: 16px;
    background: rgba(255, 122, 69, .11);
    color: #ff9a70;
}

.jeldsaz-auth__panel-icon svg { width: 25px; height: 25px; }
.jeldsaz-auth__panel-kicker { display: block; margin-bottom: 3px; color: #ff9568; font-size: 11px; font-weight: 600; }
.jeldsaz-auth__panel h2 { margin: 0; color: #fff; font-size: clamp(21px, 2vw, 26px); font-weight: 800; }
.jeldsaz-auth__panel-copy { margin: 17px 0 26px; color: var(--auth-muted); font-size: 13px; line-height: 1.8; }

.jeldsaz-auth__form { display: grid; gap: 18px; }
.jeldsaz-auth__field { display: grid; gap: 8px; color: #dde5f0; font-size: 12px; font-weight: 600; }
.jeldsaz-auth__input-wrap { position: relative; display: block; }
.jeldsaz-auth__input-wrap > svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 16px;
    width: 20px;
    height: 20px;
    color: #8794a8;
    transform: translateY(-50%);
    pointer-events: none;
}

.jeldsaz-auth__field input[type="text"],
.jeldsaz-auth__field input[type="email"],
.jeldsaz-auth__field input[type="password"] {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 48px;
    outline: none;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 14px;
    background: rgba(2, 9, 22, .42);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.jeldsaz-auth__field input::placeholder { color: #738095; opacity: 1; }
.jeldsaz-auth__field input:focus {
    border-color: rgba(255, 122, 69, .72);
    background: rgba(4, 12, 27, .64);
    box-shadow: 0 0 0 4px rgba(255, 122, 69, .09);
}

.jeldsaz-auth__password-toggle {
    position: absolute;
    top: 50%;
    left: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8794a8;
    cursor: pointer;
    transform: translateY(-50%);
}

.jeldsaz-auth__password-toggle:hover,
.jeldsaz-auth__password-toggle.is-visible { color: #ff9568; background: rgba(255, 255, 255, .05); }
.jeldsaz-auth__password-toggle svg { width: 19px; height: 19px; }

.jeldsaz-auth__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -2px;
    color: #aab5c6;
    font-size: 11px;
}

.jeldsaz-auth__options a,
.jeldsaz-auth__register a { color: #ff9a70; font-weight: 600; text-decoration: none; }
.jeldsaz-auth__options a:hover,
.jeldsaz-auth__register a:hover { color: #ffb08e; }

.jeldsaz-auth__remember { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.jeldsaz-auth__remember input { position: absolute; opacity: 0; pointer-events: none; }
.jeldsaz-auth__remember span {
    position: relative;
    width: 18px;
    height: 18px;
    border: 1px solid #536075;
    border-radius: 6px;
    background: rgba(4, 11, 24, .46);
}

.jeldsaz-auth__remember input:checked + span { border-color: var(--auth-accent); background: var(--auth-accent); }
.jeldsaz-auth__remember input:checked + span::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 5px;
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
}

.jeldsaz-auth__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    margin-top: 3px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(100deg, var(--auth-accent-strong), #ff8957);
    box-shadow: 0 14px 30px rgba(255, 95, 36, .2);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.jeldsaz-auth__submit:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(255, 95, 36, .28); filter: brightness(1.05); }
.jeldsaz-auth__submit:disabled { cursor: wait; opacity: .78; transform: none; }
.jeldsaz-auth__submit svg { width: 20px; height: 20px; transition: transform .2s ease; }
.jeldsaz-auth__submit:hover svg { transform: translateX(-3px); }
.jeldsaz-auth__submit.is-loading svg { animation: authPulse 1s ease-in-out infinite alternate; }

.jeldsaz-auth__message { display: none; padding: 10px 12px; border-radius: 11px; font-size: 11px; line-height: 1.7; }
.jeldsaz-auth__message.is-error { display: block; border: 1px solid rgba(255, 99, 99, .22); background: rgba(188, 37, 37, .18); color: #ffc8c8; }
.jeldsaz-auth__message.is-success { display: block; border: 1px solid rgba(67, 211, 143, .2); background: rgba(21, 132, 85, .18); color: #b8f5d7; }

.jeldsaz-auth__register { margin: 19px 0 0; color: #aeb9ca; text-align: center; font-size: 11px; }
.jeldsaz-auth__divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: #758197; font-size: 10px; }
.jeldsaz-auth__divider::before, .jeldsaz-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--auth-line); }
.jeldsaz-auth__socials { display: flex; gap: 10px; }
.jeldsaz-auth__socials a { flex: 1; padding: 10px; border: 1px solid var(--auth-line); border-radius: 11px; color: #dce3ec; text-align: center; text-decoration: none; font-size: 11px; }
.jeldsaz-auth__socials a:hover { border-color: rgba(255, 122, 69, .42); background: rgba(255, 255, 255, .04); }

.jeldsaz-auth__back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    color: #8e9aab;
    font-size: 11px;
    text-decoration: none;
}

.jeldsaz-auth__back:hover { color: #d5dce7; }
.jeldsaz-auth__back svg { width: 16px; height: 16px; }

.jeldsaz-auth__copyright {
    position: absolute;
    right: 0;
    bottom: 18px;
    left: 0;
    margin: 0;
    color: rgba(208, 217, 229, .5);
    text-align: center;
    font-size: 10px;
}

.alert { margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(255, 99, 99, .22); border-radius: 11px; background: rgba(188, 37, 37, .18); color: #ffc8c8; font-size: 11px; line-height: 1.7; }
.alert ul, ul.alert { list-style: none; }

@keyframes authPulse { from { opacity: .45; transform: translateX(0); } to { opacity: 1; transform: translateX(-4px); } }

@media (max-width: 980px) {
    .jeldsaz-auth { overflow: auto; padding-top: 112px; }
    .jeldsaz-auth__frame { grid-template-columns: minmax(0, 1fr) minmax(350px, 430px); gap: 38px; }
    .jeldsaz-auth__hero h1 { font-size: clamp(36px, 5.8vw, 54px); }
    .jeldsaz-auth__hero p { font-size: 14px; }
}

@media (max-width: 760px) {
    .jeldsaz-auth { display: block; padding: 98px 16px 56px; overflow: auto; }
    .jeldsaz-auth__brand { top: 22px; right: 20px; }
    .jeldsaz-auth__brand-mark { width: 40px; height: 40px; border-radius: 13px; font-size: 21px; }
    .jeldsaz-auth__brand strong { font-size: 18px; }
    .jeldsaz-auth__frame { display: flex; flex-direction: column; gap: 28px; margin: 0 auto; }
    .jeldsaz-auth__hero { width: 100%; text-align: center; }
    .jeldsaz-auth__eyebrow { margin-bottom: 14px; }
    .jeldsaz-auth__hero h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.3; }
    .jeldsaz-auth__hero h1 em { white-space: normal; }
    .jeldsaz-auth__hero p { display: none; }
    .jeldsaz-auth__benefits { justify-content: center; margin-top: 18px; }
    .jeldsaz-auth__benefits span { padding: 7px 10px; font-size: 10px; }
    .jeldsaz-auth__panel { max-width: 460px; padding: 26px 20px; border-radius: 22px; }
    .jeldsaz-auth__copyright { position: static; margin-top: 24px; }
}

@media (max-width: 390px) {
    .jeldsaz-auth__benefits span:last-child { display: none; }
    .jeldsaz-auth__options { align-items: flex-start; flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .jeldsaz-auth__media video { display: none; }
    .jeldsaz-auth__media { background: #071329 url("jeldsaz-login-poster.webp") center / cover no-repeat; }
}
