:root {
    --rmfp-ink: #241b14;
    --rmfp-muted: #817263;
    --rmfp-soft: #fffaf3;
    --rmfp-card: rgba(255, 252, 248, 0.94);
    --rmfp-line: #eadfce;
    --rmfp-gold: #b47b38;
    --rmfp-gold-dark: #8f5d26;
    --rmfp-success: #1f6f43;
    --rmfp-info: #2f6f9f;
    --rmfp-warning: #b7791f;
    --rmfp-error: #b94747;
    --rmfp-font: "Montserrat", Arial, sans-serif;
    --rmfp-shadow: 0 28px 78px rgba(48, 34, 21, 0.16);
}

.rmfp-page,
.rmfp-page * {
    box-sizing: border-box;
}

.rmfp-page {
    min-height: calc(100vh - 1px);
    color: var(--rmfp-ink);
    font-family: var(--rmfp-font);
    background: #fffaf3;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rmfp-auth {
    position: relative;
    min-height: calc(100vh - 88px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 0.92fr);
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.rmfp-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(90deg, rgba(255, 250, 243, 0.06) 0%, rgba(255, 250, 243, 0.08) 43%, rgba(255, 250, 243, 0.72) 62%, rgba(255, 250, 243, 0.97) 100%),
        url('../images/auth_ring.jpg');
    background-size: cover;
    background-position: left center;
    transform: scale(1.01);
}

.rmfp-auth::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 21% 44%, transparent 0 25%, rgba(255, 250, 243, 0.09) 46%, rgba(255, 250, 243, 0.52) 100%),
        linear-gradient(180deg, rgba(255,255,255,.02), rgba(221,191,151,.12));
    pointer-events: none;
}

.rmfp-shell {
    position: relative;
    z-index: 2;
    grid-column: 2;
    justify-self: center;
    width: min(760px, calc(100% - 70px));
    padding: 42px 0;
}

.rmfp-card {
    width: 100%;
    padding: 42px 48px;
    border-radius: 24px;
    background: var(--rmfp-card);
    border: 1px solid rgba(234, 223, 206, .96);
    box-shadow: var(--rmfp-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.rmfp-head {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 22px;
    align-items: start;
    margin-bottom: 28px;
}

.rmfp-logo {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #050505;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
    text-decoration: none;
}

.rmfp-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmfp-title {
    text-align: right;
    min-width: 0;
}

.rmfp-title h1 {
    margin: 0;
    color: var(--rmfp-ink);
    font-family: var(--rmfp-font);
    font-size: clamp(40px, 3.8vw, 54px);
    line-height: .96;
    font-weight: 900;
    letter-spacing: -.045em;
}

.rmfp-title p {
    margin: 10px 0 10px;
    color: var(--rmfp-muted);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
}

.rmfp-title strong {
    display: block;
    margin-bottom: 13px;
    color: #6f563d;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rmfp-title > span {
    position: relative;
    display: inline-block;
    width: min(230px, 100%);
    height: 1px;
    background: linear-gradient(to right, transparent, #dbc6ad 18%, #c79b65 50%, #dbc6ad 82%, transparent);
}

.rmfp-title > span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    border: 1px solid #c79b65;
    background: #fffaf3;
    transform: translate(-50%, -50%) rotate(45deg);
}

.rmfp-progress {
    display: grid;
    grid-template-columns: 36px 1fr 36px 1fr 36px;
    align-items: center;
    gap: 10px;
    margin: 4px 0 24px;
}

.rmfp-progress span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0d1bf;
    background: rgba(255,255,255,.72);
    color: #9b8b7c;
    font-size: 13px;
    font-weight: 900;
}

.rmfp-progress i {
    height: 1px;
    background: linear-gradient(to right, #e8d8c4, #c99b62, #e8d8c4);
}

.rmfp-progress .rmfp-progress-done,
.rmfp-progress .rmfp-progress-active {
    border-color: rgba(180,123,56,.46);
    color: #fff;
    background: linear-gradient(135deg, #c28b48 0%, #a56c2f 100%);
    box-shadow: 0 10px 24px rgba(169,107,47,.18);
}

.rmfp-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rmfp-step-card,
.rmfp-found-box {
    padding: 15px 18px;
    border-radius: 14px;
    border: 1px solid rgba(234, 223, 206, .96);
    background: rgba(255, 248, 238, .66);
    color: #756554;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 800;
}

.rmfp-step-card strong {
    display: block;
    margin-bottom: 2px;
    color: #a46e31;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}

.rmfp-step-card p,
.rmfp-found-box p {
    margin: 0;
}

.rmfp-found-box strong {
    color: var(--rmfp-gold-dark);
    font-weight: 900;
}

.rmfp-field label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.rmfp-control {
    position: relative;
    min-height: 64px;
    display: flex;
    align-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,.74);
    border: 1px solid var(--rmfp-line);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
    transition: border-color .24s ease, box-shadow .24s ease, background .24s ease;
}

.rmfp-control:focus-within {
    background: #fff;
    border-color: rgba(180,123,56,.55);
    box-shadow: 0 0 0 4px rgba(180,123,56,.09), inset 0 1px 0 rgba(255,255,255,.92);
}

.rmfp-icon {
    width: 46px;
    height: 46px;
    margin-left: 9px;
    border-radius: 12px;
    color: #8f6f46;
    background: #f7efe6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
}

.rmfp-icon svg,
.rmfp-eye svg,
.rmfp-toast-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rmfp-control input {
    width: 100%;
    min-width: 0;
    height: 62px;
    padding: 0 58px 0 18px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rmfp-ink);
    font-family: var(--rmfp-font);
    font-size: 16px;
    font-weight: 800;
}

.rmfp-control input::placeholder {
    color: #a89a8c;
    font-weight: 700;
}

.rmfp-country {
    padding: 0 16px 0 6px;
    color: #8d765f;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.rmfp-phone input {
    padding-right: 8px;
}

.rmfp-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #77736f;
    transform: translateY(-50%);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rmfp-eye:hover {
    color: var(--rmfp-gold-dark);
    background: #f8f0e7;
}

.rmfp-eye .rmfp-eye-close,
.rmfp-eye.rmfp-showing .rmfp-eye-open {
    display: none;
}

.rmfp-eye.rmfp-showing .rmfp-eye-close {
    display: block;
}

.rmfp-error {
    display: block;
    min-height: 17px;
    margin-top: 7px;
    color: var(--rmfp-error);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 800;
}

.rmfp-field.rmfp-field-ok .rmfp-control {
    border-color: rgba(31,111,67,.36);
    box-shadow: 0 0 0 3px rgba(31,111,67,.06);
}

.rmfp-field.rmfp-field-ok .rmfp-icon {
    color: var(--rmfp-success);
    background: #f0fbf3;
}

.rmfp-field.rmfp-field-error .rmfp-control {
    border-color: rgba(185,71,71,.52);
    box-shadow: 0 0 0 3px rgba(185,71,71,.07);
}

.rmfp-field.rmfp-field-error .rmfp-icon {
    color: var(--rmfp-error);
    background: #fff0ef;
}

.rmfp-rules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.rmfp-rule {
    min-height: 52px;
    padding: 12px 13px;
    border-radius: 13px;
    border: 1px solid #e9ddcc;
    background: rgba(255,255,255,.56);
    color: #6f6255;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rmfp-rule span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #d9c8b3;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex: 0 0 20px;
}

.rmfp-rule.rmfp-rule-ok {
    background: #f0fbf3;
    border-color: rgba(31,111,67,.18);
    color: var(--rmfp-success);
}

.rmfp-rule.rmfp-rule-ok span {
    color: var(--rmfp-success);
    border-color: rgba(31,111,67,.26);
}

.rmfp-submit,
.rmfp-anchor-btn {
    width: 100%;
    min-height: 64px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #c28b48 0%, #a56c2f 100%);
    box-shadow: 0 18px 38px rgba(169,107,47,.28);
    font-family: var(--rmfp-font);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease, opacity .22s ease;
}

.rmfp-submit:hover,
.rmfp-anchor-btn:hover {
    transform: translateY(-2px);
    filter: saturate(1.04);
    box-shadow: 0 22px 44px rgba(169,107,47,.34);
}

.rmfp-submit:disabled,
.rmfp-anchor-btn:disabled {
    opacity: .72;
    cursor: not-allowed;
    transform: none;
}

.rmfp-submit i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.48);
    border-top-color: #fff;
    display: none;
    animation: rmfpSpin .75s linear infinite;
}

.rmfp-submit.rmfp-loading i {
    display: inline-block;
}

.rmfp-submit-light {
    color: var(--rmfp-gold-dark);
    background: linear-gradient(180deg, #fffdf9 0%, #f7efe3 100%);
    border: 1px solid #ead8bf;
    box-shadow: none;
}

.rmfp-actions-row {
    display: grid;
    grid-template-columns: minmax(130px, .45fr) 1fr;
    gap: 12px;
}

.rmfp-divider {
    position: relative;
    margin: 8px 0 0;
    text-align: center;
    color: #938578;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.rmfp-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(to right, transparent, #e1d3c1 15%, #e1d3c1 85%, transparent);
}

.rmfp-divider span {
    position: relative;
    padding: 0 26px;
    background: rgba(255,252,248,.96);
}

.rmfp-link-text {
    margin: 0;
    text-align: center;
    color: #827466;
    font-size: 15px;
    font-weight: 800;
}

.rmfp-link-text a {
    color: var(--rmfp-gold-dark);
    font-weight: 900;
    text-decoration: none;
}

.rmfp-link-text a:hover {
    text-decoration: underline;
}

.rmfp-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.rmfp-modal.rmfp-modal-open {
    display: flex;
}

.rmfp-modal[hidden] {
    display: none !important;
}

.rmfp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(49, 35, 22, .48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rmfp-otp-card {
    position: relative;
    z-index: 2;
    width: min(530px, 100%);
    padding: 34px 38px 30px;
    border-radius: 24px;
    background: rgba(255,252,248,.98);
    border: 1px solid rgba(234,223,206,.96);
    box-shadow: 0 30px 74px rgba(45,31,20,.24);
    animation: rmfpModalIn .25s ease both;
    text-align: center;
}

.rmfp-otp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f1e9dd;
    color: #786c62;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.rmfp-otp-close:hover {
    background: #eadfce;
}

.rmfp-otp-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 18px;
}

.rmfp-otp-brand {
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 17px;
    background: #050505;
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
    text-decoration: none;
}

.rmfp-otp-brand img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.rmfp-otp-step-badge {
    margin-top: 12px;
    min-height: 32px;
    padding: 0 15px;
    border-radius: 999px;
    border: 1px solid #e3c89b;
    background: #fff8ef;
    color: #a46e31;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .12em;
}

.rmfp-otp-card h2 {
    margin: 14px 0 10px;
    color: var(--rmfp-ink);
    font-family: var(--rmfp-font);
    font-size: clamp(36px, 5vw, 50px);
    line-height: .95;
    font-weight: 900;
    letter-spacing: -.045em;
}

.rmfp-otp-card p {
    margin: 0 auto;
    max-width: 360px;
    color: var(--rmfp-muted);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
}

.rmfp-otp-card p strong {
    color: var(--rmfp-ink);
    font-weight: 900;
}

.rmfp-dev-otp {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px dashed #e3c089;
    background: #f9f0df;
    color: #9d6a2e;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 900;
    text-align: center;
}

.rmfp-otp-digits {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.rmfp-otp-digit {
    width: 100%;
    height: 62px;
    border-radius: 14px;
    border: 1px solid #e3d5c3;
    background: rgba(255,255,255,.74);
    text-align: center;
    color: var(--rmfp-ink);
    font-family: var(--rmfp-font);
    font-size: 25px;
    font-weight: 900;
    outline: 0;
}

.rmfp-otp-digit:focus {
    border-color: rgba(180,123,56,.7);
    box-shadow: 0 0 0 4px rgba(180,123,56,.1);
    background: #fff;
}

.rmfp-otp-meta {
    margin: 18px 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #8c7a68;
    font-size: 14px;
    font-weight: 800;
}

.rmfp-otp-meta strong {
    color: #6d5238;
}

.rmfp-otp-error {
    text-align: center;
    margin-top: 8px;
}

.rmfp-otp-submit {
    min-height: 56px;
    margin-top: 4px;
}

.rmfp-resend {
    margin-top: 12px;
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid #ead8bf;
    background: linear-gradient(180deg, #fffdf9 0%, #f7efe3 100%);
    color: var(--rmfp-gold-dark);
    font-family: var(--rmfp-font);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}

.rmfp-resend:disabled {
    opacity: .58;
    cursor: not-allowed;
}

.rmfp-toast-wrap {
    position: fixed;
    left: 38px;
    bottom: 34px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(420px, calc(100vw - 28px));
    pointer-events: none;
}

.rmfp-toast {
    pointer-events: auto;
    position: relative;
    min-height: 82px;
    display: grid;
    grid-template-columns: 54px 1fr 28px;
    gap: 14px;
    align-items: center;
    padding: 14px 14px 14px 16px;
    border-radius: 14px;
    background: rgba(255,253,249,.96);
    border: 1px solid var(--rmfp-line);
    box-shadow: 0 18px 42px rgba(47,35,24,.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: rmfpToastIn .26s ease both;
    overflow: hidden;
}

.rmfp-toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--rmfp-info);
}

.rmfp-toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rmfp-info);
    background: #eef7ff;
    border: 1px solid rgba(47,111,159,.18);
}

.rmfp-toast-title {
    margin: 0 0 5px;
    color: var(--rmfp-ink);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.01em;
    line-height: 1.05;
}

.rmfp-toast-message {
    margin: 0;
    color: #746555;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0.005em;
}

.rmfp-toast-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8c7b69;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.rmfp-toast-success::before { background: var(--rmfp-success); }
.rmfp-toast-success .rmfp-toast-icon { color: var(--rmfp-success); background: #f0fbf3; border-color: rgba(31,111,67,.22); }
.rmfp-toast-error::before { background: var(--rmfp-error); }
.rmfp-toast-error .rmfp-toast-icon { color: var(--rmfp-error); background: #fff2f1; border-color: rgba(185,71,71,.22); }
.rmfp-toast-warning::before { background: var(--rmfp-warning); }
.rmfp-toast-warning .rmfp-toast-icon { color: var(--rmfp-warning); background: #fff7e8; border-color: rgba(183,121,31,.22); }
.rmfp-toast-info::before { background: var(--rmfp-info); }
.rmfp-toast-info .rmfp-toast-icon { color: var(--rmfp-info); background: #eef7ff; border-color: rgba(47,111,159,.22); }

@keyframes rmfpSpin {
    to { transform: rotate(360deg); }
}

@keyframes rmfpToastIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rmfpModalIn {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1100px) {
    .rmfp-auth {
        grid-template-columns: 1fr;
    }

    .rmfp-bg {
        background-image:
            linear-gradient(180deg, rgba(255,250,243,.44) 0%, rgba(255,250,243,.86) 54%, rgba(255,250,243,.98) 100%),
            url('../images/auth_ring.jpg');
        background-position: center;
    }

    .rmfp-shell {
        grid-column: 1;
        width: min(720px, calc(100% - 32px));
        padding: 54px 0;
    }
}

@media (max-width: 720px) {
    .rmfp-auth {
        min-height: calc(100vh - 76px);
    }

    .rmfp-shell {
        width: min(560px, calc(100% - 22px));
        padding: 38px 0;
    }

    .rmfp-card {
        padding: 30px 20px 28px;
        border-radius: 20px;
    }

    .rmfp-head {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .rmfp-title {
        text-align: left;
    }

    .rmfp-title h1 {
        font-size: 40px;
    }

    .rmfp-control {
        min-height: 58px;
    }

    .rmfp-control input {
        height: 56px;
        font-size: 15px;
    }

    .rmfp-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .rmfp-submit {
        min-height: 58px;
        font-size: 15px;
    }

    .rmfp-rules {
        grid-template-columns: 1fr;
    }

    .rmfp-actions-row {
        grid-template-columns: 1fr;
    }

    .rmfp-toast-wrap {
        left: 12px;
        right: 12px;
        bottom: 16px;
        width: auto;
    }

    .rmfp-otp-card {
        padding: 28px 18px 22px;
        border-radius: 22px;
    }

    .rmfp-otp-card h2 {
        font-size: clamp(30px, 9vw, 44px);
    }

    .rmfp-otp-digits {
        gap: 8px;
    }

    .rmfp-otp-digit {
        height: 56px;
        border-radius: 13px;
        font-size: 22px;
    }

    .rmfp-otp-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 430px) {
    .rmfp-title h1 {
        font-size: 34px;
    }

    .rmfp-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rmfp-control input {
        padding-left: 12px;
    }
}
