/* Auth pages — aligned with Hitachi Shop storefront */

html[dir="rtl"],
html[dir="rtl"] body,
body.rtl,
body[dir="rtl"] {
    direction: rtl !important;
    text-align: right !important;
}

.auth-page,
.auth-page * {
    text-align: right;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    direction: rtl !important;
    text-align: right !important;
    font-family: iranyekan, 'Rubik', sans-serif;
    background: #141417;
}

.auth-visual {
    position: relative;
    flex: 1.15;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    direction: rtl !important;
    text-align: right !important;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(225deg, rgba(20, 20, 23, 0.72) 0%, rgba(232, 82, 48, 0.45) 55%, rgba(20, 20, 23, 0.85) 100%);
    z-index: 1;
}

.auth-visual__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 60px 50px;
    color: #fff;
    text-align: right !important;
    direction: rtl !important;
}

.auth-visual__eyebrow,
.auth-visual__title,
.auth-visual__text {
    display: block;
    width: 100%;
    text-align: right !important;
    margin-left: 0;
    margin-right: 0;
}

.auth-visual__eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #ffb39a;
    margin-bottom: 14px;
}

.auth-visual__title {
    font-size: 36px;
    line-height: 1.35;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    max-width: 420px;
}

.auth-visual__text {
    font-size: 15px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.85);
    max-width: 380px;
    margin: 0;
}

.auth-panel {
    flex: 0 0 480px;
    max-width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    position: relative;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
    direction: rtl !important;
    text-align: right !important;
}

.auth-panel__brand,
.auth-panel__heading,
.auth-panel__heading h1,
.auth-panel__heading p,
.auth-panel__footer,
.auth-panel__home,
.auth-form,
.auth-form .form-group,
.auth-form .form-group label,
.auth-form__error,
.auth-form__status,
.auth-form__forgot,
.auth-login {
    text-align: right !important;
    direction: rtl !important;
}

.auth-panel__brand {
    margin-bottom: 36px;
    text-align: right !important;
    display: flex;
    justify-content: flex-start;
    direction: rtl !important;
}

.auth-panel__brand a {
    display: inline-block;
    margin: 0;
}

.auth-panel__brand img {
    max-width: 210px;
    height: auto;
    display: block;
}

.auth-panel__heading {
    margin-bottom: 28px;
}

.auth-panel__heading h1 {
    font-size: 26px;
    line-height: 1.4;
    font-weight: 800;
    color: #141417;
    margin: 0 0 8px;
}

.auth-panel__heading p {
    font-size: 14px;
    line-height: 1.8;
    color: #8B929A;
    margin: 0;
}

.auth-form {
    width: 100%;
}

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

.auth-form .form-group label {
    display: block;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #141417;
    margin-bottom: 8px;
}

.auth-form .form-group input[type='email'],
.auth-form .form-group input[type='password'],
.auth-form .form-group input[type='text'] {
    width: 100%;
    height: 50px;
    background: #f7f8fa;
    border: 1px solid #e8eaed;
    border-radius: 5px;
    font-size: 15px;
    color: #141417;
    padding: 14px 16px;
    font-family: inherit;
    text-align: right !important;
    direction: rtl !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.auth-form .form-group input[type='email'] {
    direction: ltr !important;
    text-align: right !important;
    unicode-bidi: plaintext;
}

.auth-form .form-group input:focus {
    outline: none;
    background: #fff;
    border-color: #E85230;
    box-shadow: 0 0 0 3px rgba(232, 82, 48, 0.12);
}

.auth-form .form-group input::placeholder {
    color: #a0a6ad;
    text-align: right !important;
    opacity: 1;
}

.auth-form .form-group input[type='email']::placeholder {
    text-align: right !important;
}

.auth-form__meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    margin: 8px 0 24px;
    flex-wrap: wrap;
    direction: rtl !important;
    text-align: right !important;
    width: 100%;
}

.auth-form__remember {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: #5c6570;
    user-select: none;
    direction: rtl !important;
    text-align: right !important;
}

.auth-form__remember input[type='checkbox'] {
    width: 16px;
    height: 16px;
    accent-color: #E85230;
    cursor: pointer;
    margin: 0 0 0 8px;
    flex-shrink: 0;
}

.auth-form__forgot {
    font-size: 13px;
    font-weight: 600;
    color: #E85230;
}

.auth-form__forgot:hover {
    color: #141417;
}

.auth-form__submit {
    width: 100%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #E85230;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    padding: 14px 28px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    direction: rtl !important;
    text-align: center !important;
    transition: color 0.35s ease;
}

.auth-form__submit,
.auth-form__submit * {
    text-align: center !important;
}

.auth-form__submit i {
    margin: 0;
}

.auth-form__submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #141417;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.4s ease;
    z-index: -1;
}

.auth-form__submit:hover::before {
    transform: scaleX(1);
}

.auth-form__submit:hover {
    color: #fff !important;
}

.auth-form__error {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 13px;
    color: #d93025;
    line-height: 1.5;
}

.auth-form__status {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 5px;
    background: rgba(46, 160, 67, 0.1);
    color: #1e7a32;
    font-size: 14px;
    font-weight: 600;
}

.auth-panel__footer {
    margin-top: 28px;
    font-size: 13px;
    color: #8B929A;
}

.auth-register .auth-form .form-group {
    margin-bottom: 14px;
}

.auth-panel {
    overflow-y: auto;
    max-height: 100vh;
}

.auth-panel__footer a {
    color: #E85230;
    font-weight: 700;
}

.auth-panel__footer a:hover {
    color: #141417;
}

.auth-panel__home {
    margin-top: 18px;
}

.auth-panel__home a {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #8B929A;
    direction: rtl !important;
}

.auth-panel__home a:hover {
    color: #E85230;
}

@media only screen and (max-width: 991px) {
    .auth-page {
        flex-direction: column-reverse;
    }

    .auth-visual {
        min-height: 240px;
        flex: none;
    }

    .auth-visual__content {
        padding: 32px 24px;
        justify-content: flex-end;
        text-align: right !important;
    }

    .auth-visual__title {
        font-size: 24px;
        max-width: none;
    }

    .auth-visual__text {
        display: none;
    }

    .auth-panel {
        flex: 1;
        box-shadow: none;
        padding: 36px 24px 48px;
    }
}

@media only screen and (max-width: 480px) {
    .auth-panel__heading h1 {
        font-size: 22px;
    }

    .auth-form__meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
