.restoo-customer-profile {
    --restoo-ui-font-family: inherit;
    --restoo-ui-accent: #1f5f99;
    --restoo-ui-accent-hover: #194d7c;
    --restoo-ui-accent-soft: #eef5fb;
    --restoo-ui-text: #182737;
    --restoo-ui-text-muted: #5f6f7f;
    --restoo-ui-border: #d7dce2;
    --restoo-ui-border-strong: #bfc9d4;
    --restoo-ui-surface: #ffffff;
    --restoo-ui-surface-muted: #f6f8fa;
    --restoo-ui-danger: #a12525;
    --restoo-ui-focus: #78aee0;
    --restoo-ui-button-bg: #1f5f99;
    --restoo-ui-button-hover-bg: #194d7c;
    --restoo-ui-button-active-bg: #153f66;
    --restoo-ui-button-text: #ffffff;
    --restoo-ui-canvas-bg: transparent;
    --restoo-ui-card-bg: #ffffff;
    --restoo-ui-panel-bg: #f6f8fa;
    --restoo-ui-field-bg: #ffffff;
    --restoo-ui-tab-text: #5f6f7f;
    --restoo-ui-tab-hover-text: #1f5f99;
    --restoo-ui-tab-active-text: #1f5f99;
    --restoo-ui-tab-hover-bg: #eef5fb;
    --restoo-ui-tab-active-bg: transparent;
    --restoo-ui-tab-active-indicator: #1f5f99;
    --restoo-ui-radius: 0.875rem;
    --restoo-ui-shadow: 0 0.75rem 2rem rgb(24 39 55 / 10%);
    box-sizing: border-box;
    color: var(--restoo-ui-text);
    direction: rtl;
    font-family: var(--restoo-ui-font-family);
    inline-size: min(100%, 80rem);
    line-height: 1.6;
    margin-inline: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-inline-size: min(100%, 80rem);
    max-width: min(100%, 80rem) !important;
    width: min(100%, 80rem) !important;
    background: var(--restoo-ui-canvas-bg) !important;
}

.restoo-customer-profile *,
.restoo-customer-profile *::before,
.restoo-customer-profile *::after { box-sizing: inherit; }

.restoo-customer-profile [hidden] {
    display: none !important;
}

.restoo-customer-profile__card {
    background: var(--restoo-ui-card-bg) !important;
    border: 1px solid var(--restoo-ui-border);
    border-radius: var(--restoo-ui-radius);
    box-shadow: var(--restoo-ui-shadow);
    overflow: hidden;
}

.restoo-customer-profile__header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1rem;
}

.restoo-customer-profile__title {
    color: var(--restoo-ui-text);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 800;
    line-height: 1.45;
    margin: 0;
    text-align: right;
}

.restoo-customer-profile__description {
    color: var(--restoo-ui-text-muted);
    margin: 0.35rem 0 0;
    text-align: right;
}

.restoo-customer-profile__tabs {
    border-block: 1px solid var(--restoo-ui-border);
    direction: rtl;
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-inline: 1rem;
    scroll-padding-inline: 1rem;
    white-space: nowrap;
}

.restoo-customer-profile__tab {
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    border-block-end: 3px solid transparent !important;
    color: var(--restoo-ui-tab-text) !important;
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-weight: 800;
    min-block-size: 3rem;
    padding: 0.55rem 0.8rem;
}

.restoo-customer-profile__tab:hover:not(:disabled),
.restoo-customer-profile__tab:focus-visible:not(:disabled) {
    background: var(--restoo-ui-tab-hover-bg) !important;
    color: var(--restoo-ui-tab-hover-text) !important;
}

.restoo-customer-profile__tab.is-active {
    background: var(--restoo-ui-tab-active-bg) !important;
    border-block-end-color: var(--restoo-ui-tab-active-indicator) !important;
    color: var(--restoo-ui-tab-active-text) !important;
}

.restoo-customer-profile__tab.is-active:hover:not(:disabled),
.restoo-customer-profile__tab.is-active:focus-visible:not(:disabled) {
    background: var(--restoo-ui-tab-hover-bg) !important;
    border-block-end-color: var(--restoo-ui-tab-active-indicator) !important;
    color: var(--restoo-ui-tab-hover-text) !important;
}

.restoo-customer-profile__tab:active:not(:disabled) {
    background: var(--restoo-ui-tab-active-bg) !important;
    border-block-end-color: var(--restoo-ui-tab-active-indicator) !important;
    color: var(--restoo-ui-tab-active-text) !important;
}

.restoo-customer-profile__tab:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.restoo-customer-profile__badge {
    background: var(--restoo-ui-panel-bg) !important;
    border: 1px solid var(--restoo-ui-border);
    border-radius: 999px;
    font-size: 0.72rem;
    margin-inline-start: 0.35rem;
    padding: 0.15rem 0.45rem;
}

.restoo-customer-profile__form {
    padding: 1.25rem 1.5rem 1.5rem;
    text-align: right;
}
.restoo-customer-profile__panel {
    direction: rtl;
    display: grid;
    gap: 1rem;
    text-align: right;
}
.restoo-customer-profile__panel[hidden] { display: none; }

.restoo-customer-profile__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.85fr);
}

.restoo-customer-profile__grid > .restoo-customer-profile__section:last-child {
    grid-column: 1 / -1;
}

.restoo-customer-profile__panel[data-restoo-profile-panel="recovery"] {
    align-items: start;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
}

.restoo-customer-profile__section {
    background: var(--restoo-ui-panel-bg) !important;
    border: 1px solid var(--restoo-ui-border);
    border-radius: calc(var(--restoo-ui-radius) * 0.75);
    display: grid;
    gap: 1rem;
    padding: 1rem;
    text-align: right;
}

.restoo-customer-profile__section-title {
    color: var(--restoo-ui-text);
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    text-align: right;
}

.restoo-customer-profile__label {
    color: var(--restoo-ui-text);
    display: grid;
    font-weight: 700;
    gap: 0.45rem;
    text-align: right;
}

.restoo-customer-profile__input {
    appearance: none;
    background: var(--restoo-ui-field-bg) !important;
    border: 1px solid var(--restoo-ui-border-strong);
    border-radius: calc(var(--restoo-ui-radius) * 0.7);
    color: var(--restoo-ui-text);
    font: inherit;
    inline-size: 100%;
    min-block-size: 3rem;
    padding: 0.7rem 0.8rem;
    text-align: right;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.restoo-customer-profile__input:hover:not([readonly]):not(:disabled) { border-color: var(--restoo-ui-accent); }
.restoo-customer-profile__input:focus-visible,
.restoo-customer-profile__button:focus-visible,
.restoo-customer-profile__tab:focus-visible {
    outline: 3px solid var(--restoo-ui-focus);
    outline-offset: 2px;
}

.restoo-customer-profile__input--readonly,
.restoo-customer-profile__input:disabled {
    background: var(--restoo-ui-panel-bg) !important;
    border-color: var(--restoo-ui-border);
    color: #33475a;
}
.restoo-customer-profile__input:disabled { cursor: not-allowed; opacity: 0.78; }
.restoo-customer-profile__input[dir="ltr"] { text-align: left; }

.restoo-customer-profile__textarea { min-block-size: 6.5rem; resize: vertical; }

.restoo-customer-profile__check {
    align-items: flex-start;
    color: var(--restoo-ui-text);
    display: flex;
    font-weight: 700;
    gap: 0.6rem;
    line-height: 1.8;
    text-align: right;
}
.restoo-customer-profile__check input {
    accent-color: var(--restoo-ui-accent);
    block-size: 1.1rem;
    flex: 0 0 auto;
    inline-size: 1.1rem;
    margin-block-start: 0.3rem;
}

.restoo-customer-profile__hint {
    color: var(--restoo-ui-text-muted);
    font-size: 0.86rem;
    line-height: 1.8;
    margin: -0.35rem 0 0;
    text-align: right;
}

.restoo-customer-profile__guidance {
    background: var(--restoo-ui-tab-hover-bg) !important;
    border: 1px solid #cbddec;
    border-radius: calc(var(--restoo-ui-radius) * 0.7);
    padding: 0.9rem 1rem;
    text-align: right;
}
.restoo-customer-profile__guidance p { color: var(--restoo-ui-text-muted); margin: 0.45rem 0 0; }

.restoo-customer-profile__recovery-email-guidance {
    margin: 0.9rem 0 0;
}

.restoo-customer-profile__button {
    appearance: none;
    background: var(--restoo-ui-button-bg) !important;
    border: 1px solid transparent !important;
    border-radius: calc(var(--restoo-ui-radius) * 0.7);
    color: var(--restoo-ui-button-text) !important;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    inline-size: min(100%, 16rem);
    justify-self: start;
    min-block-size: 3rem;
    padding: 0.7rem 1rem;
    text-align: center;
}
.restoo-customer-profile__button:hover:not(:disabled),
.restoo-customer-profile__button:focus-visible:not(:disabled) {
    background: var(--restoo-ui-button-hover-bg) !important;
    color: var(--restoo-ui-button-text) !important;
}
.restoo-customer-profile__button:active:not(:disabled) {
    background: var(--restoo-ui-button-active-bg) !important;
    color: var(--restoo-ui-button-text) !important;
}
.restoo-customer-profile__button:disabled { cursor: not-allowed; opacity: 0.68; }
.restoo-customer-profile__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-start;
}

.restoo-customer-profile__button--secondary {
    background: var(--restoo-ui-panel-bg) !important;
    border-color: var(--restoo-ui-border-strong) !important;
    color: var(--restoo-ui-text-muted) !important;
}
.restoo-customer-profile__button--secondary:hover:not(:disabled),
.restoo-customer-profile__button--secondary:focus-visible:not(:disabled) {
    background: var(--restoo-ui-tab-hover-bg) !important;
    border-color: var(--restoo-ui-button-bg) !important;
    color: var(--restoo-ui-button-hover-bg) !important;
}
.restoo-customer-profile__button--secondary:active:not(:disabled) {
    background: var(--restoo-ui-tab-active-bg) !important;
    border-color: var(--restoo-ui-button-active-bg) !important;
    color: var(--restoo-ui-button-active-bg) !important;
}

.restoo-customer-profile__requests { display: grid; gap: 0.75rem; }
.restoo-customer-profile__request {
    align-items: center;
    background: var(--restoo-ui-card-bg) !important;
    border: 1px solid var(--restoo-ui-border);
    border-radius: calc(var(--restoo-ui-radius) * 0.65);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}
.restoo-customer-profile__request > div { display: grid; gap: 0.25rem; text-align: right; }
.restoo-customer-profile__request span { color: var(--restoo-ui-text-muted); font-size: 0.86rem; }
.restoo-customer-profile__status { color: var(--restoo-ui-accent) !important; font-weight: 800; }

.restoo-customer-profile__empty {
    align-items: center;
    background: var(--restoo-ui-panel-bg) !important;
    border: 1px dashed var(--restoo-ui-border-strong);
    border-radius: calc(var(--restoo-ui-radius) * 0.75);
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    min-block-size: 12rem;
    padding: 2rem 1rem;
    text-align: center;
}
.restoo-customer-profile__empty span { color: var(--restoo-ui-text-muted); }

.restoo-customer-profile__message {
    border-radius: calc(var(--restoo-ui-radius) * 0.65);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.8;
    margin: 1rem 1.5rem 0;
    min-block-size: 0;
    text-align: center;
}
.restoo-customer-profile__panel .restoo-customer-profile__message { margin: 0; }
.restoo-customer-profile__message:empty { display: none; }
.restoo-customer-profile__message--visible { min-block-size: 1.8em; padding: 0.7rem 0.85rem; }
.restoo-customer-profile__message--loading { background: var(--restoo-ui-accent-soft); border: 1px solid #cbddec; color: #25445f; }
.restoo-customer-profile__message--success { background: #f0faf4; border: 1px solid #b9dfc8; color: #20603b; }
.restoo-customer-profile__message--error { background: #fff6f6; border: 1px solid #efcaca; color: var(--restoo-ui-danger); }

.restoo-customer-profile__live {
    block-size: 1px;
    inline-size: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    clip-path: inset(50%);
}

@media (max-width: 48rem) {
    .restoo-customer-profile {
        inline-size: 100%;
        margin-inline: auto;
        max-inline-size: 100%;
        max-width: 100% !important;
        width: 100% !important;
    }
    .restoo-customer-profile__grid,
    .restoo-customer-profile__panel[data-restoo-profile-panel="recovery"] {
        grid-template-columns: 1fr;
    }
    .restoo-customer-profile__grid > .restoo-customer-profile__section:last-child {
        grid-column: auto;
    }
    .restoo-customer-profile__header { padding: 1.1rem 1rem 0.85rem; }
    .restoo-customer-profile__form { padding: 1rem; }
    .restoo-customer-profile__tabs {
        gap: 0.05rem;
        padding-inline: 0.2rem;
        scroll-padding-inline: 0.2rem;
    }
    .restoo-customer-profile__tab {
        font-size: 0.88rem;
        min-block-size: 2.7rem;
        padding: 0.45rem 0.6rem;
    }
    .restoo-customer-profile__badge {
        font-size: 0.62rem;
        margin-inline-start: 0.2rem;
        padding: 0.08rem 0.3rem;
    }
    .restoo-customer-profile__request { align-items: flex-start; flex-direction: column; }
    .restoo-customer-profile__button { inline-size: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .restoo-customer-profile__input,
    .restoo-customer-profile__button { transition: none; }
}
