.rh-account-section {
    color: var(--primary-dark, #1e1c1b);
    padding-block: 64px 100px;
}

.rh-account-section [hidden],
.rh-account-dialog [hidden] {
    display: none !important;
}

.rh-account-section button,
.rh-account-dialog button,
.rh-account-section input,
.rh-account-dialog input {
    font: inherit;
}

.rh-account-section button,
.rh-account-dialog button {
    cursor: pointer;
}

.rh-account-title {
    margin: 28px 0 36px;
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
}

.rh-account-section :is(h1, h2, h3),
.rh-account-dialog h2 {
    font-family: 'Tajawal', sans-serif;
}

.rh-account-section h2,
.rh-account-dialog h2 {
    margin: 0 0 14px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
}

.rh-account-section p {
    line-height: 1.5;
}

.rh-account-section .rh-button,
.rh-account-dialog .rh-button {
    min-height: 44px;
    padding: 10px 26px;
    white-space: nowrap;
}

.rh-login-section {
    padding-block: 84px 104px;
}

.rh-login-card {
    max-width: 900px;
    margin-inline: auto;
    padding: 48px 52px 34px;
    border: 1px solid var(--primary, #ffa600);
    border-radius: 30px;
    text-align: center;
}

.rh-login-illustration {
    position: relative;
    display: flex;
    width: 160px;
    height: 156px;
    margin: 0 auto 38px;
    align-items: center;
    flex-direction: column;
    background: #fff;
    border: 1px solid #f1e3db;
    border-radius: 15px;
    box-shadow: 0 9px 20px #79421813;
}

.rh-login-illustration__line {
    width: 22px;
    height: 2px;
    margin-top: 10px;
    background: #ffe5ce;
}

.rh-login-illustration__lock {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-top: 23px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(130deg, #ff6816, #ffa600);
    box-shadow: 0 4px 10px #ff98103b;
}

.rh-login-illustration__lock svg {
    width: 24px;
    height: 24px;
}

.rh-login-illustration__input {
    width: 120px;
    height: 28px;
    margin-top: 23px;
    border: 1px solid #e6e3df;
    border-radius: 30px;
}

.rh-login-card h1 {
    margin: 0 0 16px;
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
}

.rh-login-introduction {
    max-width: 680px;
    margin: 0 auto 28px;
    color: var(--paragraph-gray, #535353);
    font-size: 18px;
}

.rh-login-form {
    max-width: 500px;
    margin-inline: auto;
}

.rh-account-input-icon {
    position: relative;
    margin-bottom: 12px;
}

.rh-account-input-icon > svg {
    position: absolute;
    top: 50%;
    left: 20px;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    color: var(--primary, #ffa600);
    pointer-events: none;
}

.rh-account-input-icon .rh-input {
    width: 100%;
    min-height: 50px;
    padding: 11px 55px;
    border: 1px solid var(--primary, #ffa600);
    border-radius: 999px;
    background: #fff;
    font-size: 18px;
}

.rh-account-input-icon--end .rh-input {
    padding-left: 22px;
}

.rh-account-input-icon .rh-input::placeholder {
    color: #817b77;
    opacity: 1;
}

.rh-password-toggle {
    position: absolute;
    top: 3px;
    right: 6px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 11px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #69605a;
}

.rh-password-toggle svg {
    width: 22px;
    height: 22px;
}

.rh-login-submit {
    margin-top: 8px;
    background: #FFA600;
    border-color: #FFA600;
    color: #fff;
    font-size: 20px !important;
    font-weight: 700 !important;
}

.rh-login-submit:hover {
    background: #1e1c1b;
    border-color: #1e1c1b;
    color: #fff;
}

.rh-login-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.rh-account-preview-note,
.rh-account-section .rh-account-preview-note,
.rh-account-dialog .rh-account-preview-note {
    margin: 18px 0 0;
    color: #736b63;
    font-size: 13px;
    line-height: 1.5;
}

.rh-account-feedback {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border: 1px solid #efd7a2;
    border-radius: 12px;
    background: #fff8eb;
    color: #775314;
    font-size: 15px;
    line-height: 1.5;
}

.rh-account-feedback:empty {
    display: none;
}

.rh-account-feedback p {
    margin: 0;
}

.rh-account-feedback p + p {
    margin-top: 6px;
}

.rh-account-feedback.is-error {
    border-color: #f0b4ae;
    background: #fff4f3;
    color: #a32d20;
}

.rh-account-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.rh-account-sidebar {
    display: grid;
    gap: 6px;
}

.rh-account-sidebar a,
.rh-account-sidebar button {
    display: flex;
    gap: 16px;
    min-height: 58px;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--primary-dark, #1e1c1b);
    text-align: left;
    text-decoration: none;
    font-size: 17px;
    line-height: 1.3;
    transition: background-color .2s ease;
}

.rh-account-sidebar a:hover,
.rh-account-sidebar button:hover,
.rh-account-sidebar .is-active {
    background: #f5f5f5;
}

.rh-account-sidebar svg,
.rh-account-sidebar img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: var(--primary, #ffa600);
}

.rh-account-main {
    min-width: 0;
}

.rh-account-panel {
    padding: 34px;
    border: 1px solid var(--primary, #ffa600);
    border-radius: 28px;
    background: #fff;
}

.rh-account-signed-out {
    max-width: 760px;
    padding: 44px;
}

.rh-account-signed-out > p {
    margin: 0 0 22px;
    color: var(--paragraph-gray, #535353);
}

.rh-account-identity {
    display: flex;
    gap: 24px;
    align-items: center;
}

.rh-account-avatar {
    position: relative;
    display: grid;
    width: 116px;
    height: 116px;
    flex: 0 0 116px;
    place-items: center;
    border-radius: 50%;
    background: #e6e5e4;
    color: #706a64;
    font-size: 34px;
    font-weight: 700;
}

.rh-account-avatar > img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.rh-avatar-edit {
    position: absolute;
    right: -1px;
    bottom: 0;
    display: grid;
    width: 40px;
    height: 40px;
    margin: 0;
    place-items: center;
    border-radius: 50%;
    background: var(--primary, #ffa600);
    color: #fff;
    cursor: pointer;
}

.rh-avatar-edit svg {
    width: 22px;
    height: 22px;
}

.rh-account-avatar:focus-within .rh-avatar-edit {
    outline: 2px solid var(--primary-dark, #1e1c1b);
    outline-offset: 3px;
}

.rh-account-identity > .rh-button {
    background: #FFA600;
    border-color: #FFA600;
    color: #fff;
    font-weight: 700;
}

.rh-account-identity > .rh-button:hover {
    background: #1e1c1b;
    border-color: #1e1c1b;
    color: #fff;
}

.rh-account-identity-copy {
    min-width: 0;
    flex: 1;
}

.rh-account-identity-copy h2 {
    margin-bottom: 8px;
}

.rh-account-identity-copy p {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--paragraph-gray, #535353);
    font-size: 19px;
}

.rh-account-image-help {
    margin: 15px 0 0;
    color: #7b746e;
    font-size: 12px;
}

.rh-account-details {
    margin-top: 28px;
    padding-top: 30px;
    border-top: 1px solid #dedbd8;
}

.rh-account-details h2 {
    margin-bottom: 24px;
}

.rh-account-details p {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 0 0 14px;
    font-size: 19px;
}

.rh-account-details p:last-child {
    margin-bottom: 0;
}

.rh-account-details svg {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    color: var(--primary, #ffa600);
}

.rh-account-subscription {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-top: 24px;
}

.rh-account-subscription h2 {
    font-size: 28px;
}

.rh-account-subscription p {
    margin: 0;
    color: var(--paragraph-gray, #535353);
    font-size: 18px;
}

.rh-account-switch {
    position: relative;
    display: block;
    width: 66px;
    height: 36px;
    flex: 0 0 66px;
    margin: 0 0 0 auto;
    cursor: pointer;
}

.rh-account-switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.rh-account-switch span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 99px;
    background: #eeeae6;
    pointer-events: none;
}

.rh-account-switch span::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #aaa39c;
    transition: transform .2s ease, background-color .2s ease;
}

.rh-account-switch input:checked + span::after {
    transform: translateX(30px);
    background: var(--primary, #ffa600);
}

.rh-account-switch input:focus-visible + span {
    outline: 2px solid var(--primary-dark, #1e1c1b);
    outline-offset: 4px;
}

.rh-account-dialog {
    width: min(510px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);
    padding: 36px;
    border: 1px solid var(--primary, #ffa600);
    border-radius: 24px;
    background: #fff;
    color: var(--primary-dark, #1e1c1b);
    overflow-y: auto;
}

.rh-account-dialog::backdrop {
    background: #1e1c1b80;
    backdrop-filter: blur(3px);
}

.rh-account-dialog > p {
    color: var(--paragraph-gray, #535353);
}

.rh-account-dialog .rh-field {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.rh-account-dialog .rh-input {
    width: 100%;
}

.rh-account-dialog-close {
    position: absolute;
    right: 10px;
    top: 9px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f7f4f2;
    font-size: 26px !important;
    line-height: 1;
}

.rh-account-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.rh-history-heading {
    display: flex;
    gap: 15px;
    align-items: baseline;
    justify-content: space-between;
}

.rh-history-heading > span {
    flex-shrink: 0;
    color: var(--paragraph-gray, #535353);
    font-size: 15px;
}

.rh-history-empty {
    padding: 34px 15px 20px;
    text-align: center;
}

.rh-history-empty > svg {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    color: var(--primary, #ffa600);
}

.rh-history-empty h3 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
}

.rh-history-empty p {
    margin: 0 0 24px;
    color: var(--paragraph-gray, #535353);
}

.rh-history-list {
    display: grid;
    gap: 0;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.rh-history-item {
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-top: 1px solid #e7e2dd;
}

.rh-history-item h3 {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.rh-history-item time {
    color: var(--paragraph-gray, #535353);
    font-size: 15px;
}

.rh-history-item > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rh-account-section :focus-visible,
.rh-account-dialog :focus-visible {
    outline: 2px solid #ad6500;
    outline-offset: 4px;
}

@media (max-width: 991px) {
    .rh-account-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 22px;
    }

    .rh-account-panel {
        padding: 26px;
    }

    .rh-account-sidebar a,
    .rh-account-sidebar button {
        gap: 10px;
        padding-inline: 14px;
        font-size: 16px;
    }

    .rh-account-identity {
        flex-wrap: wrap;
    }

    .rh-account-identity > .rh-button {
        margin-left: 0;
    }

    .rh-account-avatar {
        width: 92px;
        height: 92px;
        flex-basis: 92px;
    }

    .rh-account-section h2 {
        font-size: 27px;
    }
}

@media (max-width: 767px) {
    .rh-account-section {
        padding-block: 36px 64px;
    }

    .rh-account-title {
        margin: 24px 0 28px;
        font-size: 42px;
    }

    .rh-account-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .rh-account-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .rh-account-sidebar a,
    .rh-account-sidebar button {
        min-height: 54px;
        padding: 10px 14px;
        border-radius: 16px;
        font-size: 15px;
    }

    .rh-account-sidebar > button {
        grid-column: 1 / -1;
        width: fit-content;
    }

    .rh-account-sidebar svg,
    .rh-account-sidebar img {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .rh-account-panel {
        padding: 24px;
        border-radius: 22px;
    }

    .rh-account-identity {
        gap: 18px;
    }

    .rh-account-identity-copy {
        flex-basis: calc(100% - 110px);
    }

    .rh-account-identity-copy h2 {
        font-size: 27px;
    }

    .rh-account-identity-copy p {
        font-size: 16px;
    }

    .rh-account-subscription {
        align-items: flex-start;
        gap: 18px;
    }

    .rh-account-subscription h2 {
        font-size: 24px;
    }

    .rh-account-subscription p,
    .rh-account-details p {
        font-size: 16px;
    }

    .rh-account-switch {
        width: 56px;
        flex-basis: 56px;
    }

    .rh-account-switch input:checked + span::after {
        transform: translateX(20px);
    }

    .rh-login-section {
        padding-block: 40px 64px;
    }

    .rh-login-card {
        padding: 32px 22px;
        border-radius: 24px;
    }

    .rh-login-illustration {
        margin-bottom: 30px;
        width: 140px;
        height: 145px;
    }

    .rh-login-illustration__lock {
        margin-top: 17px;
    }

    .rh-login-illustration__input {
        width: 108px;
        margin-top: 19px;
    }

    .rh-login-card h1 {
        font-size: 42px;
    }

    .rh-login-introduction {
        font-size: 16px;
    }

    .rh-account-input-icon .rh-input {
        padding-inline: 46px;
        font-size: 16px;
    }

    .rh-account-input-icon > svg {
        left: 15px;
    }

    .rh-history-heading {
        flex-wrap: wrap;
        gap: 0;
    }

    .rh-history-item {
        flex-wrap: wrap;
        gap: 14px;
    }

    .rh-account-dialog {
        padding: 36px 24px 24px;
    }
}

@media (max-width: 360px) {
    .rh-account-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .rh-account-identity-copy {
        flex-basis: 100%;
    }

    .rh-account-subscription {
        flex-direction: column;
    }

    .rh-account-switch {
        flex-basis: 36px;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rh-account-section *,
    .rh-account-dialog * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* Account actions retain the established rounded forms and type scale. */
.rh-login-form > .rh-field {
    display: block;
    margin: 18px 0 8px;
    text-align: left;
    font-weight: 700;
}
.rh-login-form > .rh-input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--primary, #ffa600);
    border-radius: 999px;
}
.rh-account-avatar > form { position: absolute; width: 1px; height: 1px; }
.rh-account-sidebar form { margin: 0; }
.rh-account-dialog .rh-input + .rh-field { margin-top: 16px; }
@media (max-width: 767px) {
    .rh-account-sidebar > form { grid-column: 1 / -1; width: fit-content; }
}
