/* Registration only: also loaded inside the AJAX page fragment. */
.dmn-content.wealth-registration-page {
    width: 100%;
    min-width: 0;
    max-width: 512px;
    margin: 0 auto;
    padding: 0 16px 36px;
}
.wealth-registration-page .dmn-page-box { min-width: 0; }
body .dmn-content.wealth-registration-page .dmn-page-title h1 {
    align-items: center;
    gap: 14px;
    margin: 28px 0 24px;
    color: #edf3f7;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}
body .wealth-registration-page .dmn-page-title h1::before,
body .wealth-registration-page .dmn-page-title h1::after {
    flex: 0 1 72px;
    width: 72px;
    height: 18px;
    margin: 0;
    background-size: contain;
}
body .dmn-content.wealth-registration-page .dmn-page-content {
    width: 100%;
    min-width: 0;
    max-width: 480px;
    padding: 22px 24px 18px;
    border: 1px solid rgba(203, 174, 104, .34);
    border-radius: 6px;
    background: linear-gradient(145deg, #1a303c, #112630);
    color: #c7d8e3;
    box-shadow: 0 16px 45px rgba(0, 0, 0, .3);
}
.wealth-registration-page .top-border { pointer-events: none; }
.wealth-registration-page .top-border::before,
.wealth-registration-page .top-border::after {
    top: -10px;
    width: 36px;
    height: 36px;
    background-size: contain;
}
.wealth-registration-page .top-border::before { left: -12px; }
.wealth-registration-page .top-border::after { right: -12px; }
body .dmn-content.wealth-registration-page .dmn-page-content > .row { margin: 0; }
body .dmn-content.wealth-registration-page .dmn-page-content > .row > .col-12 { padding: 0; }
body .dmn-content.wealth-registration-page .dmn-page-content .title {
    margin: 0 0 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(138, 172, 190, .16);
    color: #e0c17a;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: .2px;
    text-align: center;
    text-transform: none;
    text-shadow: none;
}
body .dmn-content.wealth-registration-page .dmn-page-content .title::before { display: none; }
.wealth-registration-page #registration_form {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    text-align: left;
}
.wealth-registration-page #registration_form .form-group { margin: 0 0 10px; }
.wealth-registration-page #registration_form .control-label {
    display: block;
    margin: 0 0 4px;
    color: #c4b180;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
}
.wealth-registration-page #registration_form .input-wrap { width: 100%; margin: 0; }
/* Keep the fields clean; the old 60px ornaments sat outside the form. */
.wealth-registration-page #registration_form .input-wrap::before { display: none; }
.wealth-registration-page #registration_form input.form-control,
.wealth-registration-page #registration_form select.form-control {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #34515f;
    border-radius: 4px;
    outline: none;
    background: #102530;
    color: #e3edf3;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12);
}
.wealth-registration-page #registration_form input.form-control:focus,
.wealth-registration-page #registration_form select.form-control:focus {
    border-color: #c3a35c;
    box-shadow: 0 0 0 2px rgba(195, 163, 92, .12);
}
.wealth-registration-page #registration_form input[readonly] { color: #95adbb; }
.wealth-registration-page #registration_form .wealth-registration-agreement {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 14px 0;
    color: #a9bfcd;
    font-size: 13px;
    line-height: 1.7;
}
.wealth-registration-page #rules {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 3px 0 0;
    accent-color: #c6a65d;
    cursor: pointer;
}
.wealth-registration-page .wealth-registration-agreement > div { min-width: 0; }
.wealth-registration-page #registration_form .wealth-registration-agreement label {
    display: inline;
    margin: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.wealth-registration-page #registration_form .wealth-rules-trigger {
    display: inline;
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #dfc17b;
    font: inherit;
    line-height: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-transform: none;
    text-shadow: none;
    white-space: normal;
    box-shadow: none;
}
.wealth-registration-page #registration_form .wealth-rules-trigger:hover { color: #f3dba4; filter: none; }
.wealth-registration-page #registration_form .wealth-registration-actions { margin: 0; }
.wealth-registration-page #registration_form button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 44px;
    margin: 0;
    padding: 11px 16px;
    border: 1px solid #b6984e;
    border-radius: 4px;
    background: linear-gradient(#dfc27c, #ba974b);
    color: #112530;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
    text-shadow: none;
    white-space: normal;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}
.wealth-registration-page #registration_form button[type="submit"]:hover {
    background: linear-gradient(#ead195, #caa75e);
    filter: none;
}
.wealth-registration-page .wealth-registration-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(138, 172, 190, .16);
}
.wealth-registration-page .wealth-registration-help a {
    color: #98b1c1;
    font-size: 12px;
    line-height: 1.6;
}
.wealth-registration-page .wealth-registration-help a:hover { color: #dfc17b; }
.wealth-registration-page button:focus-visible,
.wealth-registration-page a:focus-visible,
.wealth-registration-page #rules:focus-visible { outline: 2px solid #d4b365; outline-offset: 3px; }

/* Preserve the existing movable rules dialog and isolate it from page styles. */
.wealth-registration-page .wealth-rules-dialog {
    position: fixed;
    inset: 0;
    width: min(840px, calc(100vw - 24px));
    min-width: 0;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: min(760px, calc(100dvh - 24px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(216, 180, 86, .5);
    border-radius: 6px;
    background: #112630;
    color: #c7d8e3;
    box-shadow: 0 22px 80px rgba(0, 0, 0, .6);
}
.wealth-registration-page .wealth-rules-dialog[open] { display: flex; flex-direction: column; }
.wealth-registration-page .wealth-rules-dialog::backdrop { background: rgba(3, 12, 19, .82); }
.wealth-registration-page .wealth-rules-dialog__header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 17px 22px;
    border-bottom: 1px solid rgba(216, 180, 86, .23);
    background: linear-gradient(120deg, #1b3441, #122630);
    cursor: move;
    touch-action: none;
    user-select: none;
}
.wealth-registration-page .wealth-rules-dialog__header p {
    margin: 0 0 5px;
    color: #c6a75f;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 2px;
}
.wealth-registration-page .wealth-rules-dialog__header h2 {
    margin: 0;
    color: #edf3f7;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.4;
}
.wealth-registration-page .wealth-rules-dialog__close {
    display: flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 0;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(216, 180, 86, .3);
    border-radius: 3px;
    background: #10232e;
    color: #d8bb76;
    font: 400 26px/1 Arial, sans-serif;
    text-shadow: none;
    box-shadow: none;
}
.wealth-registration-page .wealth-rules-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 22px;
    overflow: auto;
    overscroll-behavior: contain;
}
.wealth-registration-page .wealth-rules-dialog__footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 14px 22px;
    border-top: 1px solid rgba(216, 180, 86, .23);
    background: #10232e;
}
.wealth-registration-page .wealth-rules-dialog__footer span { font-size: 12px; line-height: 1.5; }
.wealth-registration-page .wealth-rules-dialog__footer strong { color: #dfc17b; }
.wealth-registration-page .wealth-rules-dialog__done {
    min-width: 0;
    height: auto;
    min-height: 36px;
    margin: 0;
    padding: 8px 16px;
    border: 1px solid #b6984e;
    border-radius: 3px;
    background: linear-gradient(#d8b862, #af8b39);
    color: #10212b;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
    text-shadow: none;
    box-shadow: none;
}
@media (max-width: 520px) {
    .dmn-content.wealth-registration-page { padding: 0 12px 26px; }
    body .dmn-content.wealth-registration-page .dmn-page-title h1 { gap: 10px; margin: 22px 0 20px; font-size: 21px; }
    body .wealth-registration-page .dmn-page-title h1::before,
    body .wealth-registration-page .dmn-page-title h1::after { flex-basis: 36px; width: 36px; }
    body .dmn-content.wealth-registration-page .dmn-page-content { padding: 22px 19px 18px; }
    body .dmn-content.wealth-registration-page .dmn-page-content .title { font-size: 19px; }
    .wealth-registration-page .wealth-rules-dialog__header { gap: 10px; padding: 14px 16px; }
    .wealth-registration-page .wealth-rules-dialog__header h2 { font-size: 20px; }
    .wealth-registration-page .wealth-rules-dialog__body { padding: 16px; }
    .wealth-registration-page .wealth-rules-dialog__footer { padding: 12px 16px; }
}
