.itsl-login-wrap {
    --itsl-white: #FFFFFF;
    --itsl-soft-bg: #F8F7F2;
    --itsl-deep-green: #062E23;
    --itsl-secondary-green: #0B3F30;
    --itsl-gold: #D7B56D;
    --itsl-gold-hover: #B89B5E;
    --itsl-text: #111111;
    --itsl-muted: #666666;
    --itsl-border: #E8E2D2;
    --itsl-error: #B42318;
    --itsl-error-bg: #FFF1F1;
    --itsl-success-bg: #EEF7F2;
    direction: rtl;
    width: 100%;
    max-width: 480px;
    margin: 32px auto;
    padding: 0 16px;
    font-family: inherit;
    color: var(--itsl-text);
    box-sizing: border-box;
}

.itsl-login-wrap *,
.itsl-login-wrap *::before,
.itsl-login-wrap *::after {
    box-sizing: border-box;
    font-family: inherit;
}

.itsl-login-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: var(--itsl-white);
    border: 1px solid var(--itsl-border);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 14px 40px rgba(6, 46, 35, 0.10);
}

.itsl-login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--itsl-deep-green), var(--itsl-gold), var(--itsl-secondary-green));
    pointer-events: none;
}

.itsl-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--itsl-soft-bg);
    color: var(--itsl-secondary-green);
    border: 1px solid var(--itsl-border);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 14px;
}

.itsl-login-card h2 {
    margin: 0 0 10px;
    font-size: clamp(21px, 4vw, 25px);
    line-height: 1.45;
    color: var(--itsl-deep-green);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.itsl-login-card p {
    color: var(--itsl-muted);
}

.itsl-subtitle,
.itsl-policy {
    color: var(--itsl-muted);
    font-size: 14px;
    line-height: 1.95;
    margin: 0 0 22px;
}

.itsl-policy {
    margin: 14px 0 0;
    font-size: 12px;
    text-align: center;
}

.itsl-form {
    margin: 0;
}

.itsl-form label {
    display: block;
    color: var(--itsl-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    margin-bottom: 8px;
}

.itsl-form input {
    width: 100%;
    height: 52px;
    min-height: 52px;
    border: 1px solid var(--itsl-border);
    border-radius: 14px;
    padding: 0 16px;
    font-size: 17px;
    line-height: 52px;
    background: var(--itsl-white);
    color: var(--itsl-text);
    outline: none;
    box-shadow: 0 1px 0 rgba(6, 46, 35, 0.03);
    transition: border-color .22s ease, box-shadow .22s ease, background-color .22s ease;
    direction: ltr;
    text-align: left;
    appearance: none;
}

.itsl-form input::placeholder {
    color: #9A9588;
    opacity: 1;
}

.itsl-form input:hover {
    border-color: #D9CDAE;
}

.itsl-form input:focus {
    border-color: var(--itsl-gold);
    box-shadow: 0 0 0 4px rgba(215, 181, 109, 0.20), 0 10px 28px rgba(6, 46, 35, 0.06);
    background: #FFFDF8;
}

.itsl-primary-btn,
.itsl-secondary-btn,
.itsl-primary-link,
.irantajer-sms-login-button {
    width: 100%;
    min-height: 52px;
    height: 52px;
    border-radius: 14px;
    border: 0;
    margin-top: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    white-space: normal;
    transition: transform .22s ease, background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease, opacity .22s ease;
    -webkit-tap-highlight-color: transparent;
}

.itsl-primary-btn,
.itsl-primary-link,
.irantajer-sms-login-button {
    background: var(--itsl-gold);
    color: var(--itsl-deep-green);
    box-shadow: 0 12px 24px rgba(215, 181, 109, 0.28);
}

.itsl-primary-btn:hover,
.itsl-primary-btn:focus,
.itsl-primary-link:hover,
.itsl-primary-link:focus,
.irantajer-sms-login-button:hover,
.irantajer-sms-login-button:focus {
    background: var(--itsl-gold-hover);
    color: var(--itsl-deep-green);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(184, 155, 94, 0.30);
    text-decoration: none;
}

.itsl-primary-btn:active,
.itsl-primary-link:active,
.irantajer-sms-login-button:active {
    transform: translateY(0);
}

.itsl-secondary-btn {
    background: var(--itsl-soft-bg);
    color: var(--itsl-secondary-green);
    border: 1px solid var(--itsl-border);
    box-shadow: none;
}

.itsl-secondary-btn:hover:not(:disabled),
.itsl-secondary-btn:focus:not(:disabled) {
    background: #FFFFFF;
    color: var(--itsl-deep-green);
    border-color: var(--itsl-gold);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(6, 46, 35, 0.06);
}

.itsl-secondary-btn:disabled,
.itsl-primary-btn:disabled {
    opacity: .72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.itsl-resend-btn:disabled {
    background: #FAF8EF;
    color: var(--itsl-muted);
    border-color: var(--itsl-border);
}

.itsl-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 12px auto 0;
    border: 0;
    background: transparent;
    color: var(--itsl-secondary-green);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: color .22s ease, background-color .22s ease;
}

.itsl-link-btn:hover,
.itsl-link-btn:focus {
    color: var(--itsl-deep-green);
    background: rgba(215, 181, 109, 0.10);
    border-radius: 12px;
}

.itsl-alert {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.85;
    border: 1px solid transparent;
}

.itsl-alert-success {
    background: var(--itsl-success-bg);
    color: var(--itsl-secondary-green);
    border-color: rgba(11, 63, 48, 0.14);
}

.itsl-alert-error {
    background: var(--itsl-error-bg);
    color: var(--itsl-error);
    border-color: rgba(180, 35, 24, 0.18);
}

.itsl-alert-info {
    background: var(--itsl-soft-bg);
    color: var(--itsl-secondary-green);
    border-color: var(--itsl-border);
}

.itsl-code-step input[name="otp"] {
    text-align: center;
    letter-spacing: .22em;
    font-size: 22px;
    font-weight: 800;
    color: var(--itsl-deep-green);
}

.itsl-primary-btn.is-loading,
.itsl-secondary-btn.is-loading {
    pointer-events: none;
}

.irantajer-sms-login-button {
    width: auto;
    min-width: 190px;
    padding: 0 22px;
}

.woocommerce-account .itsl-login-wrap,
.woocommerce-checkout .itsl-login-wrap,
.woocommerce-cart .itsl-login-wrap {
    margin-top: 24px;
    margin-bottom: 24px;
}

.woocommerce-account .itsl-login-card,
.woocommerce-checkout .itsl-login-card,
.woocommerce-cart .itsl-login-card {
    border-radius: 18px;
}

.itsl-login-popup,
.itsl-popup,
.itsl-modal,
.irantajer-login-popup {
    direction: rtl;
    font-family: inherit;
}

.itsl-login-popup .itsl-login-wrap,
.itsl-popup .itsl-login-wrap,
.itsl-modal .itsl-login-wrap,
.irantajer-login-popup .itsl-login-wrap,
dialog .itsl-login-wrap,
[role="dialog"] .itsl-login-wrap {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 16px auto;
    padding: 0;
    scrollbar-width: thin;
}

.itsl-login-popup .itsl-login-card,
.itsl-popup .itsl-login-card,
.itsl-modal .itsl-login-card,
.irantajer-login-popup .itsl-login-card,
dialog .itsl-login-card,
[role="dialog"] .itsl-login-card {
    max-height: calc(100vh - 32px);
}

@media (max-width: 640px) {
    .itsl-login-wrap {
        max-width: 100%;
        margin: 18px auto;
        padding: 0 12px;
    }

    .itsl-login-card {
        padding: 24px 18px;
        border-radius: 18px;
        box-shadow: 0 12px 30px rgba(6, 46, 35, 0.10);
    }

    .itsl-brand-badge {
        min-height: 32px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .itsl-login-card h2 {
        font-size: 21px;
        margin-bottom: 8px;
    }

    .itsl-subtitle {
        font-size: 13.5px;
        margin-bottom: 18px;
    }

    .itsl-form input,
    .itsl-primary-btn,
    .itsl-secondary-btn,
    .itsl-primary-link,
    .irantajer-sms-login-button {
        width: 100%;
        min-width: 0;
        height: 52px;
        min-height: 52px;
        font-size: 16px;
    }

    .itsl-code-step input[name="otp"] {
        font-size: 21px;
        letter-spacing: .18em;
    }

    .itsl-policy {
        font-size: 11.5px;
        line-height: 1.9;
    }
}

@media (max-width: 380px) {
    .itsl-login-wrap {
        padding: 0 10px;
    }

    .itsl-login-card {
        padding: 22px 15px;
    }

    .itsl-primary-btn,
    .itsl-secondary-btn,
    .itsl-primary-link,
    .irantajer-sms-login-button {
        font-size: 15px;
    }
}
