@font-face {
    font-family: "Shabnam";
    src: url("../../fonts/shabnam/Shabnam.woff2") format("woff2"),
         url("../../fonts/shabnam/Shabnam.woff") format("woff"),
         url("../../fonts/Vazir.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Shabnam";
    src: url("../../fonts/shabnam/Shabnam-Medium.woff2") format("woff2"),
         url("../../fonts/shabnam/Shabnam-Medium.woff") format("woff"),
         url("../../fonts/Vazir-Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Shabnam";
    src: url("../../fonts/shabnam/Shabnam-Bold.woff2") format("woff2"),
         url("../../fonts/shabnam/Shabnam-Bold.woff") format("woff"),
         url("../../fonts/Vazir-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --erp-auth-primary: #2d8cff;
    --erp-auth-primary-hover: #1976e8;
    --erp-auth-text: #ffffff;
    --erp-auth-muted: rgba(255, 255, 255, .72);
    --erp-auth-card: rgba(25, 32, 48, .34);
    --erp-auth-card-border: rgba(255, 255, 255, .26);
    --erp-auth-input: rgba(255, 255, 255, .94);
    --erp-auth-input-text: #1e293b;
    --erp-auth-radius: 30px;
}

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

body.login_admin,
body.customers_login {
    margin: 0 !important;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--erp-auth-text);
    font-family: "Shabnam", "Vazir", Tahoma, sans-serif !important;
    background: #071226 url("../images/auth/login-background-poster.webp") center center / cover fixed no-repeat !important;
}


/* Local motion background for authentication pages. */
.erp-auth-motion {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #071226 url("../images/auth/login-background-poster.webp") center center / cover no-repeat;
}

.erp-auth-motion video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    transform: translate(-50%, -50%) scale(1.025);
    filter: saturate(1.08) contrast(1.02);
}

body.erp-auth-video-unavailable .erp-auth-motion video {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .erp-auth-motion video {
        display: none !important;
    }
}

body.login_admin::before,
body.customers_login::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(7, 15, 30, .76) 0%, rgba(9, 20, 38, .45) 45%, rgba(7, 15, 30, .48) 100%),
        radial-gradient(circle at 78% 22%, rgba(83, 141, 255, .16), transparent 36%),
        radial-gradient(circle at 16% 84%, rgba(22, 39, 69, .58), transparent 48%);
}

body.login_admin::after,
body.customers_login::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(1,8,20,.2));
}

.erp-auth-page,
.erp-auth-page *,
body.customers_login .tooltip,
body.customers_login .popover,
body.login_admin .tooltip,
body.login_admin .popover {
    font-family: "Shabnam", "Vazir", Tahoma, sans-serif !important;
    box-sizing: border-box;
}

.erp-auth-layout {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 64px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 56px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, .8fr);
    gap: clamp(48px, 8vw, 120px);
    align-items: center;
}

[dir="rtl"] .erp-auth-layout,
body.customers_login[dir="rtl"] .erp-auth-layout {
    grid-template-columns: minmax(380px, .8fr) minmax(0, 1.2fr);
}

.erp-auth-story {
    max-width: 650px;
    padding: 24px 8px;
    text-shadow: 0 4px 22px rgba(0, 0, 0, .28);
}

[dir="rtl"] .erp-auth-story {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
}

[dir="rtl"] .erp-auth-card-wrap {
    grid-column: 1;
    grid-row: 1;
}

.erp-auth-story-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    color: rgba(255,255,255,.9);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .02em;
}

.erp-auth-story-mark::before {
    content: "";
    width: 42px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    opacity: .75;
}

.erp-auth-story h1 {
    margin: 0 0 22px;
    color: #fff;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.035em;
}

.erp-auth-story p {
    max-width: 560px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: clamp(15px, 1.6vw, 19px);
    line-height: 2;
}

.erp-auth-story-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.erp-auth-story-point {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: rgba(255,255,255,.86);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 13px;
}

.erp-auth-story-point svg {
    width: 16px;
    height: 16px;
}

.erp-auth-card-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.erp-auth-card {
    width: min(100%, 470px);
    padding: clamp(28px, 4vw, 44px);
    border: 1px solid var(--erp-auth-card-border);
    border-radius: var(--erp-auth-radius);
    color: var(--erp-auth-text);
    background: var(--erp-auth-card);
    box-shadow: 0 34px 90px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.18);
    backdrop-filter: blur(28px) saturate(132%);
    -webkit-backdrop-filter: blur(28px) saturate(132%);
}

.erp-auth-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.erp-auth-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.erp-auth-brand .company-logo,
.erp-auth-brand .company-logo a,
.erp-auth-brand .company-logo img,
.erp-auth-brand > a,
.erp-auth-brand > a img {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

.erp-auth-brand img {
    max-width: 150px;
    max-height: 54px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.erp-auth-brand-fallback {
    overflow: hidden;
    max-width: 230px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-auth-role-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.09);
    color: rgba(255,255,255,.88);
    font-size: 12px;
    white-space: nowrap;
}

.erp-auth-role-badge svg {
    width: 15px;
    height: 15px;
}

.erp-auth-heading {
    margin-bottom: 28px;
}

.erp-auth-heading h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(25px, 3vw, 32px);
    line-height: 1.45;
    font-weight: 700;
}

.erp-auth-heading p {
    margin: 0;
    color: var(--erp-auth-muted);
    font-size: 14px;
    line-height: 1.9;
}

.erp-auth-card .form-group {
    margin-bottom: 18px;
}

.erp-auth-card .control-label,
.erp-auth-card label:not(.erp-auth-check-label) {
    display: inline-block;
    margin: 0 0 9px !important;
    color: rgba(255,255,255,.92) !important;
    font-size: 13px;
    font-weight: 500;
}

.erp-auth-input-wrap {
    position: relative;
}

.erp-auth-input-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 16px;
    z-index: 2;
    width: 19px;
    height: 19px;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.erp-auth-card .form-control,
.erp-auth-card .bootstrap-select > .dropdown-toggle {
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 48px 0 16px !important;
    border: 1px solid rgba(255,255,255,.42) !important;
    border-radius: 10px !important;
    outline: none !important;
    color: var(--erp-auth-input-text) !important;
    background: var(--erp-auth-input) !important;
    box-shadow: 0 7px 18px rgba(10,20,38,.08) !important;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

[dir="ltr"] .erp-auth-card .form-control {
    padding: 0 16px 0 48px !important;
}

.erp-auth-card .form-control::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.erp-auth-card .form-control:focus,
.erp-auth-card .bootstrap-select.open > .dropdown-toggle {
    border-color: rgba(74, 154, 255, .92) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(45,140,255,.16), 0 10px 28px rgba(8,22,48,.13) !important;
}

.erp-auth-password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 11px;
    z-index: 3;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #64748b;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.erp-auth-password-toggle:hover,
.erp-auth-password-toggle:focus {
    color: #2563eb;
    background: #eef5ff;
    outline: none;
}

.erp-auth-password-toggle svg {
    width: 19px;
    height: 19px;
}

.erp-auth-password-toggle .erp-eye-off {
    display: none;
}

.erp-auth-password-toggle.is-visible .erp-eye {
    display: none;
}

.erp-auth-password-toggle.is-visible .erp-eye-off {
    display: block;
}

.erp-auth-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 0 22px;
}

.erp-auth-card .checkbox {
    margin: 0;
}

.erp-auth-card .checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.erp-auth-check-label {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    margin: 0 !important;
    color: rgba(255,255,255,.82) !important;
    font-size: 12px !important;
    cursor: pointer;
}

.erp-auth-check-label::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255,255,255,.54);
    border-radius: 5px;
    background: rgba(255,255,255,.1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}

.erp-auth-card .checkbox input:checked + .erp-auth-check-label::before {
    border-color: var(--erp-auth-primary);
    background: var(--erp-auth-primary);
    box-shadow: inset 0 0 0 4px var(--erp-auth-primary), inset 0 0 0 6px #fff;
}

.erp-auth-link {
    color: rgba(255,255,255,.92) !important;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color .2s ease;
}

.erp-auth-link:hover,
.erp-auth-link:focus {
    color: #fff !important;
}

.erp-auth-submit,
.erp-auth-card .btn-primary {
    width: 100%;
    min-height: 52px;
    padding: 12px 20px !important;
    border: 0 !important;
    border-radius: 9px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #2994ff, #2579ed) !important;
    box-shadow: 0 14px 30px rgba(26,112,226,.3) !important;
    font-size: 14px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.erp-auth-submit:hover,
.erp-auth-submit:focus,
.erp-auth-card .btn-primary:hover,
.erp-auth-card .btn-primary:focus {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 34px rgba(26,112,226,.38) !important;
}

.erp-auth-secondary,
.erp-auth-card .btn-default {
    width: 100%;
    min-height: 48px;
    margin-top: 11px;
    padding: 11px 20px !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    border-radius: 9px !important;
    color: #fff !important;
    background: rgba(255,255,255,.08) !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 500;
    transition: background .2s ease, border-color .2s ease;
}

.erp-auth-secondary:hover,
.erp-auth-secondary:focus,
.erp-auth-card .btn-default:hover,
.erp-auth-card .btn-default:focus {
    border-color: rgba(255,255,255,.42) !important;
    background: rgba(255,255,255,.15) !important;
}

.erp-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 18px;
    color: rgba(255,255,255,.6);
    font-size: 12px;
}

.erp-auth-divider::before,
.erp-auth-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: rgba(255,255,255,.22);
}

.erp-auth-card-footer {
    text-align: center;
    color: rgba(255,255,255,.7);
    font-size: 12px;
    line-height: 1.9;
}

.erp-auth-card-footer a {
    color: #fff !important;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.erp-auth-card .alert {
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 10px;
    color: #fff;
    background: rgba(15,23,42,.44);
    box-shadow: none;
    font-size: 12px;
}

.erp-auth-card .alert-danger {
    border-color: rgba(255,110,110,.4);
    background: rgba(127,29,29,.46);
}

.erp-auth-card .alert-success {
    border-color: rgba(74,222,128,.38);
    background: rgba(20,83,45,.45);
}

.erp-auth-card .help-block,
.erp-auth-card .text-danger,
.erp-auth-card .has-error .help-block,
.erp-auth-card .has-error .control-label {
    color: #ffd1d1 !important;
}

.erp-auth-card .g-recaptcha {
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 18px;
    border-radius: 10px;
}

/* Customer theme container reset on login only */
body.customers_login #wrapper,
body.customers_login #content {
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body.customers_login #content > .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.customers_login #content > .container > .row {
    margin: 0 !important;
}

body.customers_login #content > .container:first-child {
    position: fixed;
    z-index: 20;
    top: 18px;
    left: 50%;
    width: min(620px, calc(100% - 28px)) !important;
    transform: translateX(-50%);
}

body.customers_login #content > .container:first-child .alert {
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px;
    color: #fff;
    background: rgba(15,23,42,.74);
    box-shadow: 0 14px 38px rgba(0,0,0,.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.customers_login .footer {
    display: none !important;
}

body.customers_login .erp-auth-page {
    width: 100%;
    min-height: 100vh;
}

body.customers_login .erp-auth-page > .erp-auth-layout {
    min-height: 100vh;
}

body.customers_login .bootstrap-select.btn-group,
body.customers_login .bootstrap-select.btn-group .dropdown-toggle,
body.customers_login .bootstrap-select.btn-group .dropdown-menu {
    width: 100%;
}

body.customers_login .bootstrap-select .dropdown-menu {
    padding: 7px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 20px 48px rgba(2,12,27,.2);
}

body.customers_login .bootstrap-select .dropdown-menu li a {
    padding: 8px 10px;
    border-radius: 8px;
    color: #334155;
}

body.customers_login .bootstrap-select .dropdown-menu li a:hover {
    background: #eef5ff;
}

@media (max-width: 991px) {
    .erp-auth-layout,
    [dir="rtl"] .erp-auth-layout {
        width: min(100% - 36px, 680px);
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 38px 0;
    }

    .erp-auth-story,
    [dir="rtl"] .erp-auth-story,
    .erp-auth-card-wrap,
    [dir="rtl"] .erp-auth-card-wrap {
        grid-column: 1;
        grid-row: auto;
    }

    .erp-auth-story {
        max-width: 100%;
        padding: 0 6px;
        text-align: center !important;
    }

    .erp-auth-story h1 {
        font-size: clamp(36px, 9vw, 54px);
    }

    .erp-auth-story p {
        margin-inline: auto;
        font-size: 15px;
    }

    .erp-auth-story-mark,
    .erp-auth-story-points {
        justify-content: center;
    }

    .erp-auth-card {
        width: min(100%, 520px);
    }
}

@media (max-width: 575px) {
    body.login_admin,
    body.customers_login {
        background-position: 42% center !important;
    }

    .erp-auth-layout,
    [dir="rtl"] .erp-auth-layout {
        width: calc(100% - 22px);
        min-height: 100svh;
        padding: 18px 0;
    }

    .erp-auth-story {
        display: none;
    }

    .erp-auth-card {
        padding: 25px 20px;
        border-radius: 23px;
    }

    .erp-auth-card-header {
        align-items: flex-start;
        margin-bottom: 22px;
    }

    .erp-auth-brand img {
        max-width: 128px;
        max-height: 44px;
    }

    .erp-auth-role-badge {
        padding: 7px 9px;
        font-size: 10px;
    }

    .erp-auth-heading h2 {
        font-size: 24px;
    }

    .erp-auth-form-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .erp-auth-card .g-recaptcha {
        transform: scale(.86);
        transform-origin: right top;
        margin-bottom: -8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erp-auth-page *,
    .erp-auth-page *::before,
    .erp-auth-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
.erp-auth-brand .logo-text {
    display: block;
    max-width: 230px;
    overflow: hidden;
    color: #fff !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.erp-auth-brand.company-logo {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

.erp-auth-brand.company-logo img {
    margin: 0 !important;
}
