/* ==========================================================================
   Customer authentication pages (sign in / sign up / password recovery)
   Loaded after identity.css, so overrides here need matching !important.
   ========================================================================== */

.ja-auth {
    padding-block: 32px 64px;
}

.ja-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    max-width: 1040px;
    margin-inline: auto;
    background: var(--id-surface);
    border: 1px solid var(--id-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 55px rgba(17, 24, 39, 0.09);
}

/* Registration needs a wider form area than the two-column split allows. */
.ja-auth-shell--wide {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
    max-width: 1180px;
}

.ja-auth-shell--solo {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
}

/* --------------------------------------------------------------------------
   Branded side panel
   -------------------------------------------------------------------------- */

.ja-auth-aside {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding: 48px 42px;
    background: linear-gradient(155deg, #0d3672 0%, var(--id-primary) 58%, #2c78de 100%);
    color: #fff;
    overflow: hidden;
}

.ja-auth-aside::before,
.ja-auth-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    z-index: -1;
}

.ja-auth-aside::before {
    width: 320px;
    height: 320px;
    top: -130px;
    inset-inline-end: -110px;
}

.ja-auth-aside::after {
    width: 220px;
    height: 220px;
    bottom: -90px;
    inset-inline-start: -70px;
}

.ja-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ja-auth-brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.ja-auth-brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
}

.ja-auth-brand-tag {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
}

.ja-auth-aside-title {
    font-size: 27px;
    font-weight: 800;
    line-height: 1.45;
    color: #fff;
    margin: 0;
}

.ja-auth-aside-text {
    font-size: 14px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0 0;
}

.ja-auth-perks {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ja-auth-perks li {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.ja-auth-perks .ja-auth-perk-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 17px;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Form side
   -------------------------------------------------------------------------- */

.ja-auth-body {
    padding: 46px 44px;
    min-width: 0;
}

.ja-auth-head {
    margin-bottom: 26px;
}

.ja-auth-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--id-text);
    margin: 0 0 6px;
}

.ja-auth-sub {
    font-size: 14px;
    color: var(--id-text-muted);
    margin: 0;
}

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

.ja-auth-body .form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--id-text);
    margin-bottom: 7px;
}

.ja-auth-body .input-required-icon {
    color: #dc3545;
    margin-inline-start: 2px;
}

.ja-auth-body .form-control {
    background: #fff !important;
    border: 1px solid #dfe3ea !important;
    border-radius: var(--id-radius-sm) !important;
    min-height: 48px !important;
    padding: 10px 15px !important;
    font-size: 14.5px;
    color: var(--id-text) !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ja-auth-body .form-control::placeholder {
    color: #9aa3b0 !important;
    font-size: 14px;
}

.ja-auth-body .form-control:focus {
    background: #fff !important;
    border-color: var(--id-primary) !important;
    box-shadow: 0 0 0 3.5px rgba(20, 85, 172, 0.12) !important;
}

.ja-auth-body .form-control.border-danger {
    border-color: #dc3545 !important;
}

/* Password visibility toggle: the theme ships a checkbox + icon pair that has
   to sit inside the field on the trailing edge in both directions. */
.ja-auth-body .password-toggle {
    position: relative;
}

.ja-auth-body .password-toggle .form-control {
    padding-inline-end: 46px !important;
}

.ja-auth-body .password-toggle-btn {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 9px;
    cursor: pointer;
    color: var(--id-text-muted);
}

.ja-auth-body .password-toggle-btn:hover {
    background: var(--id-muted);
    color: var(--id-text);
}

.ja-auth-body .password-toggle-btn .password-toggle-indicator {
    font-size: 16px;
    line-height: 1;
}

.ja-auth-hint {
    display: block;
    font-size: 12px;
    color: var(--id-text-muted);
    margin-top: 6px;
}

.ja-auth-body .password-error {
    display: block;
    font-size: 12px;
    margin-top: 6px;
}

/* Phone field: intl-tel-input injects an absolutely positioned country button,
   so the text input needs padding on that side to stop the flag and the
   placeholder overlapping. */
.ja-auth-body .iti {
    display: block;
    width: 100%;
}

.ja-auth-body .iti .form-control {
    width: 100%;
    padding-inline-start: 92px !important;
    text-align: start;
    direction: ltr;
}

.ja-auth-body .iti__flag-container {
    inset-inline-start: 0;
    inset-inline-end: auto;
}

.ja-auth-body .iti__selected-flag {
    border-start-start-radius: var(--id-radius-sm);
    border-end-start-radius: var(--id-radius-sm);
    padding-inline: 12px 8px;
    background: var(--id-muted);
    gap: 6px;
}

.ja-auth-body .iti__selected-dial-code {
    direction: ltr;
    font-size: 14px;
    color: var(--id-text);
}

.ja-auth-body .iti__country-list {
    text-align: start;
    direction: ltr;
    border-radius: var(--id-radius-sm);
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.14);
    border: 1px solid var(--id-border);
}

/* --------------------------------------------------------------------------
   Remember me / forgot password row
   -------------------------------------------------------------------------- */

.ja-auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ja-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--id-text-soft);
    cursor: pointer;
}

.ja-auth-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 0;
    accent-color: var(--id-primary);
    cursor: pointer;
}

.ja-auth-link {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--id-primary);
    text-decoration: none;
}

.ja-auth-link:hover {
    color: var(--id-primary);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Captcha
   -------------------------------------------------------------------------- */

.ja-auth-captcha {
    margin-bottom: 20px;
}

.ja-auth-captcha .default-captcha-container {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.ja-auth-captcha .default-captcha-container input[name="default_captcha_value"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 10px 15px;
    font-size: 14.5px;
    color: var(--id-text);
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: var(--id-radius-sm);
    outline: none;
}

.ja-auth-captcha .default-captcha-container input[name="default_captcha_value"]:focus {
    border-color: var(--id-primary);
    box-shadow: 0 0 0 3.5px rgba(20, 85, 172, 0.12);
}

.ja-auth-captcha .captcha-image-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 8px;
    background: var(--id-muted);
    border: 1px solid var(--id-border);
    border-radius: var(--id-radius-sm);
    cursor: pointer;
}

.ja-auth-captcha .captcha-image-container img {
    height: 38px;
    width: auto;
    border-radius: 8px;
}

.ja-auth-captcha .captcha-image-container .refresh-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    opacity: 0.55;
    transition: transform 0.35s ease;
}

.ja-auth-captcha .captcha-image-container:hover .refresh-icon {
    opacity: 1;
}

.ja-auth-captcha .captcha-image-container .refresh-icon.rotate-active {
    transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Submit + social
   -------------------------------------------------------------------------- */

.ja-auth-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: var(--id-radius-sm);
    background: var(--id-primary);
    color: #fff;
    font-size: 15.5px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(20, 85, 172, 0.24);
    transition: filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.ja-auth-submit:hover:not(:disabled) {
    color: #fff;
    filter: brightness(1.07);
    box-shadow: 0 12px 28px rgba(20, 85, 172, 0.3);
}

.ja-auth-submit:disabled {
    opacity: 0.55;
    box-shadow: none;
    cursor: not-allowed;
}

.ja-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    font-size: 13px;
    color: var(--id-text-muted);
}

.ja-auth-divider::before,
.ja-auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--id-border);
}

.ja-auth-socials {
    display: grid;
    gap: 10px;
}

.ja-auth-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: var(--id-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--id-text);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ja-auth-social:hover {
    background: var(--id-muted);
    border-color: #cfd6e0;
    color: var(--id-text);
}

.ja-auth-social img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.ja-auth-foot {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--id-text-muted);
}

.ja-auth-foot a {
    font-weight: 700;
    color: var(--id-primary);
    text-decoration: none;
}

.ja-auth-foot a:hover {
    text-decoration: underline;
}

.ja-auth-alert {
    padding: 14px 16px;
    border-radius: var(--id-radius-sm);
    background: #fff4e5;
    border: 1px solid #ffd9a8;
    color: #8a5300;
    font-size: 14px;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .ja-auth-shell,
    .ja-auth-shell--wide {
        grid-template-columns: minmax(0, 1fr);
        max-width: 560px;
    }

    /* The panel is decorative; on narrow screens it only pushes the form down. */
    .ja-auth-aside {
        display: none;
    }
}

@media (max-width: 575px) {
    .ja-auth {
        padding-block: 20px 44px;
    }

    .ja-auth-shell,
    .ja-auth-shell--wide,
    .ja-auth-shell--solo {
        border-radius: 18px;
    }

    .ja-auth-body {
        padding: 30px 20px;
    }

    .ja-auth-title {
        font-size: 22px;
    }

    .ja-auth-captcha .default-captcha-container {
        flex-wrap: wrap;
    }

    .ja-auth-captcha .default-captcha-container input[name="default_captcha_value"] {
        flex: 1 1 100%;
    }
}
