html.cps-auth-document,
body.cps-auth-standalone-page {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    background: #f8f8fc;
}

body.cps-auth-standalone-page {
    min-height: 100vh;
}

body.cps-auth-standalone-page #wpadminbar {
    display: none !important;
}

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

.cps-auth-screen {
    --cps-auth-primary: #825f5f;
    --cps-auth-primary-dark: #6e4e4e;
    --cps-auth-bg: #f8f8fc;
    --cps-auth-wave-back: #cec5c9;
    --cps-auth-wave-front: #7d5d5d;
    --cps-auth-text: #3d3030;
    --cps-auth-muted: #777277;
    --cps-auth-border: #dedbdd;
    --cps-auth-success: #0f9f91;
    --cps-auth-error: #c24b55;
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 30px 18px max(90px, 12vh);
    overflow: hidden;
    direction: rtl;
    background: var(--cps-auth-bg);
    color: var(--cps-auth-text);
    font-family: inherit;
}

.cps-auth-waves {
    position: absolute;
    z-index: -1;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: clamp(245px, 39vh, 390px);
    pointer-events: none;
}

.cps-auth-wave-back {
    fill: var(--cps-auth-wave-back);
}

.cps-auth-wave-front {
    fill: var(--cps-auth-wave-front);
}

.cps-auth-card {
    position: relative;
    width: min(354px, 100%);
    min-height: 390px;
    padding: 26px 20px 20px;
    overflow: hidden;
    border: 1px solid #dbd8d8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(78, 58, 58, .035);
}

.cps-auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 108px;
    margin: 0 0 9px;
}

.cps-auth-logo-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 108px;
}

.cps-auth-logo-img {
    display: block;
    width: auto;
    max-width: 126px;
    max-height: 108px;
    object-fit: contain;
}

.cps-auth-logo-fallback {
    display: none;
}

.cps-auth-logo-media.is-broken .cps-auth-logo-img {
    display: none;
}

.cps-auth-logo-media.is-broken .cps-auth-logo-fallback {
    display: block;
}

.cps-auth-site-name {
    max-width: 100%;
    font-size: 25px;
    line-height: 1.4;
    text-align: center;
}

.cps-auth-copy {
    margin-bottom: 25px;
    text-align: center;
}

.cps-auth-copy h2 {
    margin: 0 0 9px;
    color: var(--cps-auth-primary-dark);
    font: 700 15px/1.6 inherit;
}

.cps-auth-copy p {
    margin: 0;
    color: var(--cps-auth-muted);
    font-size: 12px;
    line-height: 1.9;
}

.cps-auth-copy b {
    color: var(--cps-auth-primary-dark);
    font-weight: 700;
    direction: ltr;
    unicode-bidi: isolate;
}

.cps-auth-form {
    width: 100%;
}

.cps-auth-form > label,
.cps-auth-otp-label {
    display: block;
    margin: 0 0 9px;
    color: #211d1d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
    text-align: right;
}

.cps-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 17px;
}

.cps-auth-input-wrap input {
    width: 100%;
    height: 47px;
    padding: 0 42px 0 42px;
    border: 1px solid var(--cps-auth-border);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: #272323;
    font: 12px/1.5 inherit;
    text-align: right;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.cps-auth-input-wrap input::placeholder {
    color: #959095;
    opacity: 1;
}

.cps-auth-input-wrap input:focus {
    border-color: var(--cps-auth-primary);
    box-shadow: 0 0 0 3px rgba(130, 95, 95, .11);
}

.cps-auth-field-icon,
.cps-auth-password-toggle {
    position: absolute;
    left: 13px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #777;
    transform: translateY(-50%);
}

.cps-auth-password-toggle {
    cursor: pointer;
}

.cps-auth-field-icon svg,
.cps-auth-password-toggle svg,
.cps-auth-secondary svg,
.cps-auth-back svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: currentColor;
    stroke: none;
}

.cps-auth-password-toggle .hidden-icon {
    display: block;
}

.cps-auth-password-toggle .visible-icon {
    display: none;
}

.cps-auth-password-toggle.is-visible .hidden-icon {
    display: none;
}

.cps-auth-password-toggle.is-visible .visible-icon {
    display: block;
}

.cps-auth-password-toggle.is-visible {
    color: var(--cps-auth-primary);
}

.cps-auth-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 9px 15px;
    border: 0;
    border-radius: 9px;
    background: var(--cps-auth-primary);
    color: #fff;
    font: 700 13px/1.5 inherit;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.cps-auth-primary:hover,
.cps-auth-primary:focus-visible {
    background: var(--cps-auth-primary-dark);
    box-shadow: 0 8px 18px rgba(110, 78, 78, .17);
    transform: translateY(-1px);
}

.cps-auth-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 25px;
}

.cps-auth-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 48px;
    padding: 8px 6px;
    border: 1px solid #ebe8e9;
    border-radius: 7px;
    background: #fff;
    color: #272323;
    font: 700 11px/1.5 inherit;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.cps-auth-secondary:hover,
.cps-auth-secondary:focus-visible {
    border-color: #d8cbcf;
    background: #faf7f8;
    color: var(--cps-auth-primary-dark);
}

.cps-auth-secondary svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: #9b9999;
}

.cps-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 10px 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #aaa5a8;
    font: 400 11px/1.5 inherit;
    cursor: pointer;
}

.cps-auth-back:hover,
.cps-auth-back:focus-visible {
    color: var(--cps-auth-primary);
}

.cps-auth-back svg {
    width: 15px;
    height: 15px;
}

.cps-auth-hint {
    display: block;
    margin: -10px 2px 15px;
    color: #9a9497;
    font-size: 10px;
}

.cps-auth-otp-label {
    margin-top: 6px !important;
}

.cps-auth-otp {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0 0 22px;
}

.cps-auth-otp-input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 49px;
    padding: 0;
    border: 1px solid var(--cps-auth-border);
    border-radius: 9px;
    outline: 0;
    background: #fff;
    color: #2b2525;
    font: 700 19px/1 inherit;
    text-align: center;
    direction: ltr;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.cps-auth-otp-input:focus {
    border-color: var(--cps-auth-primary);
    box-shadow: 0 0 0 3px rgba(130, 95, 95, .11);
}

.cps-auth-resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    margin: 0 0 18px;
    direction: ltr;
}

.cps-auth-timer {
    color: #252020;
    font: 500 11px/1.2 inherit;
    direction: ltr;
}

.cps-auth-resend {
    min-height: 26px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: #e6e4e4;
    color: #c0bdbf;
    font: 500 10px/1.4 inherit;
    cursor: not-allowed;
}

.cps-auth-resend.is-ready {
    background: #f2ebed;
    color: var(--cps-auth-primary-dark);
    cursor: pointer;
}

.cps-auth-loading {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px;
    background: rgba(255, 255, 255, .94);
    color: var(--cps-auth-text);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, visibility .16s ease;
}

.cps-auth-screen.is-loading .cps-auth-loading {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cps-auth-loading strong {
    margin-top: 5px;
    color: var(--cps-auth-primary-dark);
    font-size: 14px;
}

.cps-auth-loading small {
    color: var(--cps-auth-muted);
    font-size: 11px;
}

.cps-auth-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #d9d2d3;
    border-left-color: var(--cps-auth-primary);
    border-radius: 50%;
    animation: cps-auth-spin .75s linear infinite;
}

.cps-auth-toast {
    position: fixed;
    z-index: 1000000;
    top: 12px;
    right: 12px;
    max-width: min(390px, calc(100vw - 24px));
    min-height: 46px;
    padding: 13px 20px;
    border-radius: 2px;
    box-shadow: 0 13px 36px rgba(50, 45, 62, .2);
    color: #fff;
    font: 600 13px/1.6 inherit;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.cps-auth-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cps-auth-toast.is-success {
    background: var(--cps-auth-success);
}

.cps-auth-toast.is-error {
    background: var(--cps-auth-error);
}

.cps-auth-already {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    direction: rtl;
    text-align: center;
}

.cps-auth-already a {
    color: #725353;
    font-weight: 700;
}

@keyframes cps-auth-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .cps-auth-screen {
        align-items: center;
        min-height: 100svh;
        padding: 18px 14px 88px;
    }

    .cps-auth-waves {
        height: 31vh;
        min-height: 210px;
    }

    .cps-auth-card {
        width: min(354px, 100%);
        min-height: 380px;
        padding: 22px 18px 18px;
        border-radius: 15px;
    }

    .cps-auth-logo {
        min-height: 96px;
    }

    .cps-auth-logo-img {
        max-height: 96px;
        max-width: 116px;
    }

    .cps-auth-secondary-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 18px;
    }

    .cps-auth-secondary {
        min-height: 44px;
    }

    .cps-auth-otp {
        gap: 7px;
    }

    .cps-auth-otp-input {
        height: 47px;
    }
}

@media (max-height: 690px) and (min-width: 601px) {
    .cps-auth-screen {
        align-items: flex-start;
        padding-top: 26px;
    }

    .cps-auth-card {
        transform: scale(.92);
        transform-origin: top center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cps-auth-spinner {
        animation-duration: 1.5s;
    }

    .cps-auth-screen *,
    .cps-auth-screen *::before,
    .cps-auth-screen *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
