/* Authentication pages — scoped to the existing Classicode dark/gold theme. */
.auth-shell {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 18px;
}

.auth-shell,
.auth-shell * {
    box-sizing: border-box;
}

.auth-shell .heading-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.7;
    font-weight: 500;
    text-transform: none;
}

.auth-shell .description {
    margin: 2px 0 30px;
    font-size: 14px;
    line-height: 2;
    font-weight: 400;
}

.auth-shell .description::after {
    margin-top: 9px;
}

.auth-shell > .container {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 0;
}

.auth-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    margin: 0 0 24px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
}

.auth-switch button {
    min-height: 46px;
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .84);
    font: inherit;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.auth-switch button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .04);
}

.auth-switch button.is-active {
    color: #202124;
    background: var(--base-color, #dba423);
    box-shadow: 0 8px 22px rgba(219, 164, 35, .18);
}

.auth-pane,
.auth-step,
.auth-pane form {
    text-align: right !important;
}

.auth-pane {
    display: none;
    width: 100%;
    padding: 2px 4px 0;
}

.auth-pane.is-active,
.auth-step.is-active {
    display: block;
}

.auth-step {
    display: none;
}

.auth-shell .form-item {
    width: 100%;
    margin: 0 0 17px;
    font-size: 14px !important;
}

.auth-shell .form-item label {
    display: block;
    margin: 0 0 7px !important;
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
    line-height: 1.9;
    font-weight: 600;
}

.auth-shell .required {
    color: var(--base-color, #dba423);
    font-size: 15px;
}

.auth-shell .form-control,
.auth-shell input.form-control {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px !important;
    border: 1px solid rgba(255, 255, 255, .11) !important;
    border-radius: 9px !important;
    outline: 0;
    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    line-height: 48px;
    direction: rtl;
    text-align: right !important;
    box-shadow: none !important;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.auth-shell .form-control::placeholder {
    color: rgba(255, 255, 255, .35);
    font-size: 13px;
}

.auth-shell .form-control:focus {
    border-color: rgba(219, 164, 35, .9) !important;
    background: rgba(219, 164, 35, .025) !important;
    box-shadow: 0 0 0 3px rgba(219, 164, 35, .08) !important;
}

.auth-shell .form-control.form-error {
    border-color: rgba(225, 91, 91, .9) !important;
}

.auth-shell input[type="tel"],
.auth-shell input[dir="ltr"] {
    direction: ltr;
    text-align: left !important;
}

.auth-shell .otp-code-input {
    direction: ltr;
    text-align: right !important;
    letter-spacing: 6px;
    font-size: 18px;
    font-weight: 800;
}

.auth-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin: 4px 0 17px;
    padding: 11px 13px;
    border: 1px solid rgba(219, 164, 35, .18);
    border-radius: 10px;
    background: rgba(219, 164, 35, .065);
    color: rgba(255, 255, 255, .78);
    font-size: 12.5px;
    line-height: 2;

}

.auth-hint i {
    flex: 0 0 auto;
    margin-top: 3px;
    color: var(--base-color, #dba423);
    font-size: 16px;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 18px;
}

/* Keep old markup compatible, but remove template decorations around pill-btn. */
.auth-shell .pill-btn {
    display: contents;
}

.auth-shell .pill-btn::before,
.auth-shell .pill-btn::after {
    display: none !important;
    content: none !important;
}

.auth-shell .secondary-button {
    min-width: 138px;
    min-height: 44px;
    padding: 9px 22px !important;
    border: 1px solid var(--base-color, #dba423);
    border-radius: 22px !important;
    background: transparent;
    color: var(--base-color, #dba423);
    font: inherit;
    font-size: 13px !important;
    line-height: 1.8;
    font-weight: 700;
    cursor: pointer;
}

.auth-shell .secondary-button:hover {
    color: #202124;
    background: var(--base-color, #dba423);
}

.auth-shell .light-link,
.auth-link-button {
    padding: 7px 2px;
    border: 0;
    background: transparent;
    color: var(--base-color, #dba423);
    font: inherit;
    font-size: 12.5px;
    line-height: 1.8;
    cursor: pointer;
}

.auth-link-button:disabled {
    color: rgba(255, 255, 255, .34);
    cursor: default;
}

.auth-countdown {
    color: rgba(255, 255, 255, .55);
    font-size: 12px;
}

.auth-error,
.auth-success {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    line-height: 1.9;
}

.auth-error {
    color: #ffb0b0;
    border: 1px solid rgba(211, 72, 72, .23);
    background: rgba(211, 72, 72, .08);
}

.auth-success {
    color: #a7e5c3;
    border: 1px solid rgba(45, 170, 108, .23);
    background: rgba(45, 170, 108, .08);
}

.auth-error.is-visible,
.auth-success.is-visible {
    display: block;
}

.auth-busy {
    pointer-events: none;
    opacity: .68;
}

/* The animated background bubbles cross the form and make auth pages look broken. */
body.account-auth-page .area .circles {
    display: none;
}

@media (max-width: 767px) {
    .auth-shell {
        max-width: 560px;
        padding: 0 12px;
    }

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

    .auth-shell .description {
        margin-bottom: 22px;
        font-size: 13px;
    }

    .auth-switch button {
        min-height: 43px;
        padding: 7px 8px;
        font-size: 12px;
    }
}

@media (max-width: 430px) {
    .auth-switch {
        gap: 3px;
        padding: 4px;
    }

    .auth-switch button {
        font-size: 11px;
    }

    .auth-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-shell .secondary-button,
    .auth-shell .light-link,
    .auth-link-button {
        width: 100%;
        text-align: center;
    }
}

/* =========================================================
   Compact auth layout refinements
   Keeps the existing site composition while preventing a
   simple login/register form from requiring an inner scroll.
   ========================================================= */
body.account-auth-page #main > section.form {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

body.account-auth-page #main > section.form .mCSB_inside > .mCSB_container,
body.account-auth-page #main > section.form .mCSB_container {
    margin-right: 0 !important;
}

.auth-shell {
    max-width: 680px;
    padding-inline: 14px;
}

.auth-shell .heading-title {
    font-size: 23px;
    line-height: 1.55;
}

.auth-shell .description {
    margin: 2px 0 18px;
    font-size: 13px;
    line-height: 1.8;
}

.auth-shell .description::after {
    margin-top: 7px;
}

.auth-shell > .container {
    max-width: 590px;
}

.auth-switch {
    margin-bottom: 16px;
    border-radius: 12px;
}

.auth-switch button {
    min-height: 42px;
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 12.5px;
}

.auth-pane {
    padding-inline: 2px;
}

.auth-shell .form-item {
    margin-bottom: 11px;
}

.auth-shell .form-item label {
    margin-bottom: 5px !important;
    font-size: 12px;
    line-height: 1.75;
}

.auth-shell .form-control,
.auth-shell input.form-control {
    height: 44px;
    padding-inline: 13px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .025) !important;
    font-size: 13px;
    line-height: 44px;
}

/* Chrome autofill otherwise paints the dark form in light blue. */
.auth-shell input.form-control:-webkit-autofill,
.auth-shell input.form-control:-webkit-autofill:hover,
.auth-shell input.form-control:-webkit-autofill:focus,
.auth-shell input.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    box-shadow: 0 0 0 1000px #2d2e32 inset !important;
    transition: background-color 9999s ease-out 0s;
}

.auth-shell .otp-code-input {
    text-align: left !important;
    letter-spacing: 4px;
    font-size: 16px;
}

.auth-hint {
    margin: 2px 0 12px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 11.5px;
    line-height: 1.85;
}

.auth-hint i {
    margin-top: 2px;
    font-size: 15px;
}

.auth-actions {
    gap: 9px 12px;
    margin-top: 12px;
}

.auth-shell .secondary-button {
    min-width: 130px;
    min-height: 40px;
    padding: 7px 18px !important;
    font-size: 12px !important;
}

.auth-shell .light-link,
.auth-link-button {
    font-size: 11.5px;
}

.auth-error,
.auth-success {
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 11.5px;
}

@media (min-width: 992px) and (min-height: 720px) {
    body.account-auth-page #main > section.form .mCustomScrollBox,
    body.account-auth-page #main > section.form .mCSB_container {
        min-height: 100%;
    }

    body.account-auth-page #main > section.form .mCSB_container {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-height: 720px) and (min-width: 992px) {
    body.account-auth-page #main > section.form {
        padding-top: .85rem !important;
        padding-bottom: .85rem !important;
    }

    .auth-shell .heading-title {
        font-size: 21px;
    }

    .auth-shell .description {
        margin-bottom: 12px;
    }

    .auth-switch {
        margin-bottom: 12px;
    }

    .auth-shell .form-item {
        margin-bottom: 8px;
    }
}

@media (max-width: 767px) {
    body.account-auth-page #main > section.form {
        padding: 1.2rem .8rem 4.5rem !important;
    }

    .auth-shell {
        padding-inline: 5px;
    }

    .auth-shell .heading-title {
        font-size: 20px;
    }

    .auth-shell .description {
        margin-bottom: 16px;
        font-size: 12px;
    }

    .auth-switch {
        margin-bottom: 14px;
    }

    .auth-switch button {
        min-height: 40px;
        padding-inline: 6px;
        font-size: 11px;
    }
}

@media (max-width: 430px) {
    .auth-actions {
        gap: 7px;
        margin-top: 10px;
    }

    .auth-shell .secondary-button {
        min-height: 40px;
    }
}
