/* Login / Register — clean RTL-first layout */

.s1-body--flow-auth .s1-demo-banner,
.s1-body--flow-auth .s1-header,
.s1-body--flow-auth .s1-footer,
.s1-body--flow-auth .s1-floating-actions {
    display: none !important;
}

.s1-body--flow-auth .main {
    padding: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
}

.s1-login {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 480px);
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
}

/* ——— Form column (يمين في RTL) ——— */
.s1-login__main {
    display: flex;
    flex-direction: column;
    padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 1.25rem;
    background: #ffffff;
}

.s1-login__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.s1-login__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.s1-login__back:hover {
    color: var(--s1-primary);
}

.s1-login__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--s1-dark);
    font-weight: 800;
    font-size: 1rem;
}

.s1-login__logo img {
    border-radius: 10px;
}

.s1-login__card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.s1-login__tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 2rem;
}

.s1-login__tab {
    flex: 1;
    text-align: center;
    padding: 0.85rem 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #94a3b8;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.s1-login__tab:hover {
    color: #64748b;
}

.s1-login__tab.is-active {
    color: var(--s1-primary);
    border-bottom-color: var(--s1-primary);
}

.s1-login__head h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--s1-dark);
    margin: 0 0 0.4rem;
    line-height: 1.3;
}

.s1-login__head p {
    font-size: 0.92rem;
    color: #64748b;
    margin: 0 0 1.75rem;
    line-height: 1.6;
}

.s1-login__alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.s1-login__alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.s1-login__alert--info {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #ffedd5;
}

.s1-login__alert code {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.s1-login__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.s1-login__field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
}

.s1-login__input-wrap {
    position: relative;
}

.s1-login__input-wrap .s1-login__icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
    line-height: 1;
}

.s1-login__input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 2.85rem 0 2.75rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--s1-dark);
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.s1-login__input-wrap input::placeholder {
    color: #a8b4c4;
}

.s1-login__input-wrap input:focus {
    outline: none;
    background: #fff;
    border-color: var(--s1-primary);
    box-shadow: 0 0 0 3px rgba(255, 72, 0, 0.15);
}

.s1-login__input-wrap input.is-invalid {
    border-color: #ef4444;
}

.s1-login__toggle-pw {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0.4rem;
    cursor: pointer;
    line-height: 1;
    border-radius: 8px;
}

.s1-login__toggle-pw:hover {
    color: var(--s1-primary);
}

.s1-login__submit {
    height: 52px;
    margin-top: 0.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: inherit;
    color: #fff;
    background: var(--s1-primary);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(255, 72, 0, 0.35);
}

.s1-login__submit:hover {
    background: var(--s1-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(255, 72, 0, 0.4);
}

.s1-login__link {
    text-align: center;
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
}

.s1-login__link a {
    color: var(--s1-primary);
    font-weight: 700;
    text-decoration: none;
}

.s1-login__link a:hover {
    text-decoration: underline;
}

.s1-login__foot {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.s1-login__perks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.s1-login__perks span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.s1-login__perks i {
    color: var(--s1-primary);
}

.s1-login__legal {
    text-align: center;
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.s1-login__legal a {
    color: #64748b;
}

/* Register row */
.s1-login__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ——— Side panel (يسار في RTL) ——— */
.s1-login__side {
    position: relative;
    overflow: hidden;
    display: none;
    background: #1a2332;
}

.s1-login__side-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s1-login__side-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(255, 72, 0, 0.25) 100%
    );
}

.s1-login__side-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem 2rem;
    color: #fff;
}

.s1-login__side-eyebrow {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffb380;
    margin: 0 0 0.5rem;
}

.s1-login__side-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.s1-login__side-text {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.9;
    margin: 0 0 1.5rem;
    max-width: 32ch;
}

.s1-login__side-gallery {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.s1-login__side-gallery img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.s1-login__side-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.s1-login__side-badge i {
    color: #4ade80;
}

@media (min-width: 992px) {
    .s1-login__side {
        display: block;
    }
}

@media (max-width: 991.98px) {
    .s1-login {
        grid-template-columns: 1fr;
    }

    .s1-login__main {
        min-height: 100dvh;
        justify-content: flex-start;
    }

    .s1-login__card {
        justify-content: flex-start;
        padding-top: 0.5rem;
    }

    .s1-login__top {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .s1-login__row {
        grid-template-columns: 1fr;
    }

    .s1-login__perks {
        flex-direction: column;
        align-items: center;
    }

    .s1-login__head h1 {
        font-size: 1.4rem;
    }
}

/* ——— تسجيل بالجوال (خطوات + OTP) ——— */
.s1-auth-steps {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.s1-auth-steps__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
    min-width: 0;
}

.s1-auth-steps__dot {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    background: #e2e8f0;
    color: #64748b;
}

.s1-auth-steps__text {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
}

.s1-auth-steps__item.is-active .s1-auth-steps__dot {
    background: var(--s1-primary);
    color: #fff;
}

.s1-auth-steps__item.is-active .s1-auth-steps__text {
    color: var(--s1-primary);
}

.s1-auth-steps__item.is-done .s1-auth-steps__dot {
    background: #22c55e;
    color: #fff;
}

.s1-auth-otp {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    direction: ltr;
    margin-top: 0.35rem;
}

.s1-auth-otp.is-invalid-wrap .s1-auth-otp__box {
    border-color: #ef4444;
}

.s1-auth-otp__box {
    width: 100%;
    aspect-ratio: 1;
    max-height: 4rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.65rem;
    font-weight: 800;
    font-family: inherit;
    text-align: center;
    color: var(--s1-dark, #0f172a);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    padding: 0;
}

.s1-auth-otp__box:focus {
    outline: none;
    border-color: var(--s1-primary);
    box-shadow: 0 0 0 3px rgba(255, 72, 0, 0.15);
}

.s1-auth-otp__box.is-invalid {
    border-color: #ef4444;
}

.s1-auth-otp__box:disabled {
    opacity: 0.65;
    cursor: wait;
}

[data-otp-form].is-verifying .s1-auth-otp__box {
    border-color: var(--s1-primary);
}

.s1-auth-otp__status {
    text-align: center;
    color: var(--s1-primary);
    font-weight: 600;
}
