:root {
    --rmp-ink: #241b14;
    --rmp-muted: #817263;
    --rmp-cream: #fffaf3;
    --rmp-paper: rgba(255, 252, 248, 0.94);
    --rmp-line: #eadfce;
    --rmp-gold: #b47b38;
    --rmp-gold-dark: #8f5d26;
    --rmp-success: #1f6f43;
    --rmp-info: #2f6f9f;
    --rmp-warning: #b7791f;
    --rmp-error: #b94747;
    --rmp-font: "Montserrat", Arial, sans-serif;
    --rmp-shadow: 0 28px 78px rgba(48, 34, 21, 0.16);
}

.rmp-page,
.rmp-page * {
    box-sizing: border-box;
}

.rmp-page {
    min-height: calc(100vh - 1px);
    color: var(--rmp-ink);
    font-family: var(--rmp-font);
    background: #fffaf3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rmp-hero {
    position: relative;
    min-height: calc(100vh - 88px);
    padding: 42px 0 70px;
    overflow: hidden;
    isolation: isolate;
}

.rmp-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(90deg, rgba(255, 250, 243, 0.12) 0%, rgba(255, 250, 243, 0.20) 38%, rgba(255, 250, 243, 0.78) 66%, rgba(255, 250, 243, 0.98) 100%),
        url('../images/auth_ring.jpg');
    background-size: cover;
    background-position: left center;
    transform: scale(1.01);
}

.rmp-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 30%, transparent 0 23%, rgba(255,250,243,.12) 45%, rgba(255,250,243,.60) 100%),
        linear-gradient(180deg, rgba(255,255,255,.03), rgba(221,191,151,.14));
    pointer-events: none;
}

.rmp-container {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.rmp-shell {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.rmp-card {
    border-radius: 24px;
    padding: 30px;
    background: var(--rmp-paper);
    border: 1px solid rgba(234, 223, 206, .96);
    box-shadow: var(--rmp-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.rmp-summary-card {
    position: sticky;
    top: 112px;
    text-align: center;
}

.rmp-logo-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    overflow: hidden;
    background: #050505;
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

.rmp-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmp-avatar-wrap {
    width: 142px;
    height: 142px;
    margin: 0 auto 18px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, #ead1a6 0%, #b47b38 100%);
    box-shadow: 0 18px 36px rgba(48, 34, 21, .16);
}

.rmp-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #f7efe6;
    border: 3px solid #fffaf3;
}

.rmp-mini {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--rmp-gold-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.rmp-summary-text h2 {
    margin: 0 0 8px;
    color: var(--rmp-ink);
    font-size: 30px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.rmp-summary-text p {
    margin: 0 0 16px;
    color: var(--rmp-muted);
    font-size: 13px;
    line-height: 1.7;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.rmp-badge-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.rmp-role-badge,
.rmp-logout-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}

.rmp-role-badge {
    background: #17120d;
    color: #fff;
}

.rmp-logout-badge {
    background: #fff2f1;
    color: var(--rmp-error);
    border: 1px solid rgba(185,71,71,.18);
}

.rmp-summary-meta {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--rmp-line);
    display: grid;
    gap: 14px;
}

.rmp-summary-meta div {
    display: grid;
    gap: 5px;
    text-align: left;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.58);
    border: 1px solid #eee3d4;
}

.rmp-summary-meta strong {
    color: var(--rmp-ink);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rmp-summary-meta span {
    color: var(--rmp-muted);
    font-size: 13px;
    font-weight: 800;
}

.rmp-side-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin-top: 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #c28b48 0%, #a56c2f 100%);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    transition: transform .22s ease, box-shadow .22s ease;
    box-shadow: 0 16px 34px rgba(169,107,47,.24);
}

.rmp-side-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(169,107,47,.32);
}

.rmp-head {
    margin-bottom: 26px;
}

.rmp-head h1 {
    margin: 0;
    color: var(--rmp-ink);
    font-size: clamp(38px, 4vw, 54px);
    line-height: .98;
    font-weight: 900;
    letter-spacing: -.045em;
}

.rmp-head p {
    margin: 10px 0 16px;
    color: var(--rmp-muted);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 700;
}

.rmp-head-line {
    position: relative;
    display: block;
    width: min(270px, 100%);
    height: 1px;
    background: linear-gradient(to right, #dbc6ad 0%, #c79b65 50%, transparent 100%);
}

.rmp-head-line::after {
    content: "";
    position: absolute;
    left: 60%;
    top: 50%;
    width: 9px;
    height: 9px;
    border: 1px solid #c79b65;
    background: #fffaf3;
    transform: translate(-50%, -50%) rotate(45deg);
}

.rmp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rmp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.rmp-field-full {
    grid-column: 1 / -1;
}

.rmp-field label {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--rmp-ink);
    font-size: 13px;
    font-weight: 900;
}

.rmp-control {
    position: relative;
    min-height: 64px;
    display: flex;
    align-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,.74);
    border: 1px solid var(--rmp-line);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
    transition: border-color .24s ease, box-shadow .24s ease, background .24s ease;
}

.rmp-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);
}

.rmp-control.is-readonly {
    background: rgba(250,247,242,.82);
}

.rmp-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;
}

.rmp-icon svg,
.rmp-toast-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rmp-control input,
.rmp-control select,
.rmp-control textarea {
    width: 100%;
    min-width: 0;
    min-height: 62px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rmp-ink);
    font-family: var(--rmp-font);
    font-size: 15px;
    font-weight: 800;
}

.rmp-control select {
    cursor: pointer;
}

.rmp-control textarea {
    min-height: 124px;
    padding: 18px 16px;
    resize: vertical;
    line-height: 1.6;
}

.rmp-control-textarea {
    align-items: flex-start;
}

.rmp-control-textarea .rmp-icon {
    margin-top: 9px;
}

.rmp-control.is-readonly input,
.rmp-control.is-readonly select,
.rmp-control.is-readonly textarea,
.rmp-control input[readonly] {
    color: #7a6c5e;
    cursor: not-allowed;
}

.rmp-field-error .rmp-control {
    border-color: rgba(185,71,71,.52);
    box-shadow: 0 0 0 3px rgba(185,71,71,.07);
}

.rmp-field-error .rmp-icon {
    color: var(--rmp-error);
    background: #fff0ef;
}

.rmp-upload-box {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.82) 0%, rgba(248,241,232,.82) 100%);
    border: 1px solid var(--rmp-line);
}

.rmp-upload-preview {
    width: 126px;
    height: 126px;
    border-radius: 24px;
    overflow: hidden;
    background: #f5ede3;
    border: 1px solid var(--rmp-line);
    box-shadow: 0 12px 28px rgba(48, 34, 21, .10);
}

.rmp-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmp-upload-actions strong {
    display: block;
    margin-bottom: 6px;
    color: var(--rmp-ink);
    font-size: 15px;
    font-weight: 900;
}

.rmp-upload-actions p {
    margin: 0 0 12px;
    color: var(--rmp-muted);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.rmp-upload-actions input[type="file"] {
    display: block;
    width: 100%;
    padding: 14px;
    border: 1px dashed #ccb89d;
    border-radius: 14px;
    background: #fff;
    color: #5f5549;
    font-family: var(--rmp-font);
    font-size: 13px;
    font-weight: 700;
}

.rmp-hint {
    display: block;
    min-height: 16px;
    margin-top: 7px;
    color: #8b7d6d;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.rmp-error {
    display: block;
    min-height: 16px;
    margin-top: 5px;
    color: var(--rmp-error);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
}

.rmp-actions {
    display: flex;
    justify-content: flex-start;
}

.rmp-submit {
    min-width: 220px;
    min-height: 62px;
    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(--rmp-font);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease, opacity .22s ease;
}

.rmp-submit:hover {
    transform: translateY(-2px);
    filter: saturate(1.04);
    box-shadow: 0 22px 44px rgba(169,107,47,.34);
}

.rmp-submit:disabled {
    opacity: .72;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.48);
    border-top-color: #fff;
    display: none;
    animation: rmpSpin .75s linear infinite;
}

.rmp-submit.is-loading .btn-loader {
    display: inline-block;
}

.rmp-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;
}

.rmp-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(--rmp-line);
    box-shadow: 0 18px 42px rgba(47,35,24,.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: rmpToastIn .26s ease both;
    overflow: hidden;
}

.rmp-toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--rmp-info);
}

.rmp-toast-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rmp-info);
    background: #eef7ff;
    border: 1px solid rgba(47,111,159,.18);
}

.rmp-toast-title {
    margin: 0 0 5px;
    color: var(--rmp-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.05;
}

.rmp-toast-message {
    margin: 0;
    color: #746555;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.rmp-toast-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8c7b69;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.rmp-toast-success::before { background: var(--rmp-success); }
.rmp-toast-success .rmp-toast-icon { color: var(--rmp-success); background: #f0fbf3; border-color: rgba(31,111,67,.22); }
.rmp-toast-error::before { background: var(--rmp-error); }
.rmp-toast-error .rmp-toast-icon { color: var(--rmp-error); background: #fff2f1; border-color: rgba(185,71,71,.22); }
.rmp-toast-warning::before { background: var(--rmp-warning); }
.rmp-toast-warning .rmp-toast-icon { color: var(--rmp-warning); background: #fff7e8; border-color: rgba(183,121,31,.22); }
.rmp-toast-info::before { background: var(--rmp-info); }
.rmp-toast-info .rmp-toast-icon { color: var(--rmp-info); background: #eef7ff; border-color: rgba(47,111,159,.22); }

@keyframes rmpSpin {
    to { transform: rotate(360deg); }
}

@keyframes rmpToastIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1199px) {
    .rmp-shell {
        grid-template-columns: 1fr;
    }

    .rmp-summary-card {
        position: static;
    }
}

@media (max-width: 860px) {
    .rmp-hero {
        padding: 26px 0 54px;
    }

    .rmp-bg {
        background-image:
            linear-gradient(180deg, rgba(255,250,243,.48) 0%, rgba(255,250,243,.88) 55%, rgba(255,250,243,.98) 100%),
            url('../images/auth_ring.jpg');
        background-position: center;
    }

    .rmp-container {
        width: min(100% - 22px, 680px);
    }

    .rmp-card {
        border-radius: 20px;
        padding: 22px 16px;
    }

    .rmp-head h1 {
        font-size: 36px;
    }

    .rmp-grid {
        grid-template-columns: 1fr;
    }

    .rmp-upload-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .rmp-upload-preview {
        margin: 0 auto;
    }

    .rmp-actions {
        justify-content: stretch;
    }

    .rmp-submit {
        width: 100%;
    }

    .rmp-toast-wrap {
        left: 12px;
        right: 12px;
        bottom: 16px;
        width: auto;
    }
}

@media (max-width: 430px) {
    .rmp-head h1 {
        font-size: 32px;
    }

    .rmp-summary-text h2 {
        font-size: 26px;
    }
}
