/* ── Profile / cabinet page ───────────────────────────── */

.profile-page {
    min-height: 100vh;
    background: var(--color-page-bg);
}

.profile-page__container {
    width: min(var(--container-width), 100% - 48px);
    margin: 0 auto;
    padding-top: 30px;
    padding-bottom: 48px;
}

.profile-page__body {
    padding-top: 30px;
}

/* ── Tabs toolbar (tabs + archive) ───────────────────── */

.profile-tabs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-tabs-toolbar__archive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--radius-md);
    background: #e8e1dd;
    color: #917865;
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition-ui), background-color var(--transition-ui);
}

.profile-tabs-toolbar__archive[hidden] {
    display: none !important;
}

.profile-tabs-toolbar__archive:hover,
.profile-tabs-toolbar__archive:focus-visible {
    color: var(--color-brand-dark);
    background: #dfd6cf;
}

.profile-tabs-toolbar__archive.is-active {
    background: var(--color-white);
    color: var(--color-brand-dark);
}

.profile-tabs--desktop {
    display: grid;
}

.profile-tabs-select {
    display: none;
    position: relative;
    width: 100%;
}

.profile-tabs-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-brand-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: color var(--transition-ui);
}

.profile-tabs-select__trigger:hover,
.profile-tabs-select__trigger:focus-visible,
.profile-tabs-select__trigger[aria-expanded="true"] {
    color: var(--color-text-strong);
}

.profile-tabs-select__trigger[aria-expanded="true"] .profile-tabs-select__chevron {
    transform: rotate(180deg);
}

.profile-tabs-select__label {
    min-width: 0;
    text-align: left;
}

.profile-tabs-select__chevron {
    flex-shrink: 0;
    transition: transform var(--transition-ui);
}

.profile-tabs-select__menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    border-radius: var(--radius-md);
    background: var(--color-white);
    box-shadow: 0 12px 32px rgb(33 22 23 / 12%);
}

.profile-tabs-select__menu[hidden] {
    display: none;
}

.profile-tabs-select__option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-brand-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-ui), color var(--transition-ui);
}

.profile-tabs-select__option:hover,
.profile-tabs-select__option:focus-visible {
    background: #f9f9f9;
}

.profile-tabs-select__option.is-active {
    background: #f4ece5;
    color: var(--color-text-strong);
    font-weight: 500;
}

/* ── Tabs (Figma Tab / Tinted) ───────────────────────── */

.profile-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(1000px, 100%);
    min-height: 52px;
    margin-bottom: 0;
    padding: 2px;
    border-radius: var(--radius-md);
    background: #e8e1dd;
}

.profile-tabs__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #917865;
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-ui), background-color var(--transition-ui), box-shadow var(--transition-ui);
}

.profile-tabs__tab:hover,
.profile-tabs__tab:focus-visible {
    color: var(--color-brand-dark);
}

.profile-tabs__tab.is-active {
    background: var(--color-white);
    color: var(--color-text-strong);
    box-shadow:
        0 0 2px rgb(16 16 18 / 12%),
        0 1px 2px rgb(16 16 18 / 4%),
        0 2px 4px rgb(16 16 18 / 2%),
        0 4px 8px rgb(16 16 18 / 1%);
}

/* ── Panels ──────────────────────────────────────────── */

[data-profile-panel][hidden] {
    display: none !important;
}

.profile-panel__title {
    margin: 0 0 20px;
    color: var(--color-brand-dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.page-profile .profile-panel__title {
    display: none;
}

.profile-panel__text {
    margin: 0;
    color: var(--color-header-muted);
    font-size: 14px;
    line-height: 1.4;
}

.profile-panel__stub {
    padding-top: 8px;
}

/* ── Section head ────────────────────────────────────── */

.profile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
}

.profile-section-head__title {
    margin: 0;
    color: var(--color-brand-dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-section-head__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: var(--color-white);
    color: var(--color-brand-dark);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: background-color var(--transition-ui);
}

.profile-section-head__link:hover,
.profile-section-head__link:focus-visible {
    background: var(--color-form-field-bg);
}

.profile-section-head__link img {
    transform: rotate(-90deg);
}

.profile-section-head__link-text--short {
    display: none;
}

/* ── Summary card ────────────────────────────────────── */

.profile-summary {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding: 30px;
    border-radius: var(--radius-lg);
    background: var(--color-white);
}

.profile-summary__user {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.profile-summary__avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 96px;
    height: 96px;
}

.profile-summary__avatar {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-summary__avatar-rating {
    position: absolute;
    left: 50%;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    width: max-content;
    border-radius: var(--radius-pill);
    background: var(--color-hero-orange);
    color: var(--color-white);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    line-height: 15px;
    transform: translate(-50%, 50%);
    white-space: nowrap;
}

.profile-summary__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.profile-summary__premium {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 4px;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: rgb(214 130 89 / 10%);
    color: var(--color-hero-orange);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    line-height: 15px;
}

.profile-summary__name {
    margin: 0;
    color: var(--color-brand-dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-summary__registered {
    margin: 0;
    color: var(--color-menu-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-summary__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    flex: 1 1 auto;
    max-width: 1040px;
}

.profile-summary__stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 20px;
    border-radius: var(--radius-md);
    background: #f9f9f9;
}

.profile-summary__stat-value {
    color: var(--color-brand-dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-summary__stat-label {
    color: var(--color-menu-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-summary__stat-label--mobile {
    display: none;
}

/* ── Listings preview grid ───────────────────────────── */

.profile-listings-preview {
    margin-top: 30px;
}

.profile-listings-preview__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
}

.page-profile .catalog-card__media {
    height: 397px;
}

.page-profile .profile-listings-panel__grid .catalog-card__stats {
    margin-top: auto;
}

.page-profile .catalog-card__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f9f9f9;
}

.page-profile .catalog-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--color-brand-dark);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.page-profile .catalog-card__stat img {
    flex-shrink: 0;
}

/* ── Listings panel (owner cards) ────────────────────── */

.profile-listings-panel__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
}

.page-profile .profile-listings-panel__grid .catalog-card,
.page-profile .profile-favorites-panel__grid .catalog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-profile .profile-listings-panel__grid .catalog-card__body,
.page-profile .profile-favorites-panel__grid .catalog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.page-profile .profile-favorites-panel__grid .catalog-card__footer + .catalog-card__remove-favorite {
    margin-top: auto;
}

.page-profile .catalog-card__owner-actions {
    margin-top: 0;
    padding-top: 10px;
}

.profile-listings-view[hidden] {
    display: none !important;
}

.profile-listings-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 40px 24px;
    border-radius: 16px;
    background: var(--color-white);
    text-align: center;
}

.profile-listings-empty__title {
    margin: 0;
    color: var(--color-brand-dark);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.profile-listings-empty__text {
    margin: 10px 0 0;
    max-width: 420px;
    color: var(--color-header-muted);
    font-size: 15px;
    line-height: 1.5;
}

.profile-listings-empty__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 20px;
    padding: 0 22px;
    border-radius: var(--radius-pill);
    background: var(--color-brand-brown);
    color: var(--color-white);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-decoration: none;
    transition: background-color var(--transition-ui);
}

.profile-listings-empty__link:hover,
.profile-listings-empty__link:focus-visible {
    background: #6b4a3a;
}

.catalog-card--archived {
    cursor: default;
}

.catalog-card__head--archive {
    justify-content: flex-end;
}

.catalog-card__archive-label {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgb(255 255 255 / 92%);
    color: var(--color-brand-dark);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.profile-listings-panel__grid--archived .catalog-card__badge {
    max-width: calc(100% - 96px);
}

.catalog-card__owner-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 10px;
}

.catalog-card__promote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #d68259;
    color: var(--color-white);
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.catalog-card__promote:hover,
.catalog-card__promote:focus-visible {
    background: #c9744d;
}

.catalog-card__promote--disabled {
    background: #d8d2cd;
    color: #8a827c;
    cursor: not-allowed;
    pointer-events: none;
}

.catalog-card__secondary-action--full {
    width: 100%;
}

.catalog-card__owner-actions-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.catalog-card__secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: #f9f9f9;
    color: var(--color-brand-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.catalog-card__secondary-action:hover,
.catalog-card__secondary-action:focus-visible {
    background: #efefef;
}

.catalog-card__restore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--color-hero-orange);
    color: var(--color-white);
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.catalog-card__restore:hover,
.catalog-card__restore:focus-visible {
    background: #c9744d;
}

.profile-listings-panel__grid--archived .catalog-card__head--archive {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.profile-listings-panel__grid--archived .catalog-card__posted {
    align-self: flex-end;
}

.profile-listings-panel__grid--archived .catalog-card__title {
    margin: 0;
    min-width: 0;
    color: var(--color-brand-dark);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* ── Favorites panel ─────────────────────────────────── */

.profile-favorites-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 48px 24px;
    text-align: center;
}

.profile-favorites-empty[hidden] {
    display: none !important;
}

.profile-favorites-empty__icon {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 2px rgb(16 16 18 / 8%),
        0 8px 24px rgb(16 16 18 / 6%);
}

.profile-favorites-empty__icon img {
    display: block;
    width: 40px;
    height: 40px;
}

.profile-favorites-empty__title {
    margin: 0;
    max-width: 420px;
    color: var(--color-brand-dark);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.profile-favorites-empty__text {
    margin: 12px 0 0;
    max-width: 460px;
    color: var(--color-header-muted);
    font-size: 15px;
    line-height: 1.5;
}

.profile-favorites-empty__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 24px;
    padding: 0 22px;
    border-radius: var(--radius-pill);
    background: var(--color-brand-brown);
    color: var(--color-white);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-decoration: none;
    transition: background-color var(--transition-ui);
}

.profile-favorites-empty__link:hover,
.profile-favorites-empty__link:focus-visible {
    background: #6b4a3a;
}

.profile-favorites-panel__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
}

.catalog-card__remove-favorite {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: #f9f9f9;
    color: var(--color-brand-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.catalog-card__remove-favorite:hover,
.catalog-card__remove-favorite:focus-visible {
    background: #efefef;
}

/* ── Settings panel ──────────────────────────────────── */

.profile-settings-panel {
    display: flex;
    flex-direction: column;
    gap: 19px;
    max-width: 798px;
}

.profile-settings-panel > .profile-panel__title {
    margin-bottom: 0;
}

.profile-settings-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.profile-settings-photo {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 163px;
    padding: 24px 30px;
    border-radius: var(--radius-lg);
    background: var(--color-white);
}

.profile-settings-photo__avatar {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-settings-photo__name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--color-brand-dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-settings-photo__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-left: auto;
}

.profile-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1.25;
    letter-spacing: -0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.profile-settings-btn--primary {
    background: var(--color-brand-brown);
    color: var(--color-white);
}

.profile-settings-btn--primary:hover,
.profile-settings-btn--primary:focus-visible {
    background: var(--color-btn-primary-hover);
}

.profile-settings-btn--primary:active {
    background: var(--color-btn-primary-active);
}

.profile-settings-btn--danger {
    background: #e66060;
    color: var(--color-white);
}

.profile-settings-btn--danger:hover,
.profile-settings-btn--danger:focus-visible {
    background: #d95555;
}

.profile-settings-btn--block {
    width: 100%;
}

.profile-settings-btn--save {
    width: min(391px, 100%);
    margin-top: 16px;
}

.profile-settings-btn__spinner {
    display: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid rgb(255 255 255 / 35%);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: profile-settings-btn-spin 0.7s linear infinite;
}

.profile-settings-btn--loading {
    cursor: wait;
    pointer-events: none;
}

.profile-settings-btn--loading .profile-settings-btn__spinner {
    display: block;
}

.profile-settings-btn--primary:disabled {
    background: var(--color-btn-primary-hover);
    cursor: wait;
}

@keyframes profile-settings-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.profile-settings-section__title {
    margin: 0 0 19px;
    color: var(--color-brand-dark);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-settings-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-settings-form__grid--updates {
    row-gap: 16px;
}

.profile-settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.profile-settings-field--phone {
    gap: 16px;
}

.profile-settings-field--full {
    grid-column: 1 / -1;
}

.profile-settings-field__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-settings-field__label {
    color: #917865;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-settings-field__box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    background: var(--color-white);
}

.profile-settings-field__box--select {
    width: 100%;
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.profile-settings-field__box--select:hover,
.profile-settings-field__box--select:focus-visible {
    background: #fafafa;
}

.profile-settings-field__icon {
    flex-shrink: 0;
}

.profile-settings-field__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--color-brand-dark);
}

.profile-settings-field__input:focus {
    outline: none;
}

.profile-settings-field__input::placeholder {
    color: var(--color-header-muted);
}

.profile-settings-field__value {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--color-brand-dark);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.profile-settings-field__chevron {
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 1280px) {
    .profile-summary {
        flex-direction: column;
    }

    .profile-summary__stats {
        max-width: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-listings-preview__grid,
    .profile-listings-panel__grid,
    .profile-favorites-panel__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .profile-page__container {
        width: min(var(--container-width), 100% - 32px);
    }

    .profile-tabs-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-tabs-select {
        display: block;
    }

    .profile-tabs--desktop {
        display: none;
    }

    .profile-tabs-toolbar__archive {
        width: 100%;
    }

    .profile-summary {
        padding: 20px;
    }

    .profile-summary__user {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .profile-summary__avatar-wrap {
        width: 96px;
        height: 96px;
    }

    .profile-summary__avatar {
        width: 96px;
        height: 96px;
    }

    .profile-summary__name {
        font-size: 20px;
    }

    .profile-summary__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .profile-summary__stat {
        align-items: center;
        min-height: 80px;
        padding: 16px 12px;
        text-align: center;
    }

    .profile-summary__stat-value,
    .profile-summary__stat-label {
        width: 100%;
        text-align: center;
    }

    .profile-summary__stat-value {
        font-size: 20px;
    }

    .profile-summary__stat-label {
        font-size: 13px;
        line-height: 1.3;
    }

    .profile-summary__stat-label--desktop {
        display: none;
    }

    .profile-summary__stat-label--mobile {
        display: block;
    }

    .page-profile .profile-listings-preview__grid .catalog-card__media,
    .page-profile .profile-listings-panel__grid .catalog-card__media,
    .page-profile .profile-favorites-panel__grid .catalog-card__media,
    .page-realtor .profile-listings-preview__grid .catalog-card__media {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .profile-section-head {
        align-items: center;
        margin-bottom: 16px;
    }

    .profile-section-head__title {
        font-size: 20px;
    }

    .profile-section-head__link {
        flex-shrink: 0;
        margin-left: auto;
    }

    .profile-section-head__link-text--full {
        display: none;
    }

    .profile-section-head__link-text--short {
        display: inline;
    }

    .profile-listings-preview__grid,
    .profile-listings-panel__grid,
    .profile-favorites-panel__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-settings-photo {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        min-height: 0;
        padding: 20px;
    }

    .profile-settings-photo__avatar {
        width: 90px;
        height: 90px;
    }

    .profile-settings-photo__name {
        display: none;
    }

    .profile-settings-photo__actions {
        display: flex;
        width: fit-content;
        max-width: 100%;
        margin-left: 0;
        justify-content: center;
        gap: 12px;
    }

    .profile-settings-photo__actions .profile-settings-btn--primary {
        width: fit-content;
    }

    .profile-settings-photo__actions .profile-settings-btn--danger {
        flex: 0 0 48px;
        width: 48px;
        padding: 0;
    }

    .profile-settings-photo__actions .profile-settings-btn--danger .profile-settings-btn__label {
        display: none;
    }

    .profile-settings-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #profile-settings-contacts-title {
        font-size: 20px;
    }

    #profile-settings-updates-title {
        font-size: 16px;
    }

    .profile-settings-btn--save {
        width: 100%;
    }
}

.profile-settings-select {
    position: relative;
}

.profile-settings-select__menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow: auto;
    padding: 6px;
    border-radius: var(--radius-md);
    background: var(--color-white);
    box-shadow: 0 12px 32px rgba(33, 22, 23, 0.12);
}

.profile-settings-select__menu[hidden] {
    display: none;
}

.profile-settings-select__option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: left;
    font-size: 14px;
    color: var(--color-brand-dark);
}

.profile-settings-select__option:hover,
.profile-settings-select__option:focus-visible {
    background: var(--color-form-field-bg);
}

/* ── Avatar crop modal ───────────────────────────────── */

body.avatar-crop-open {
    overflow: hidden;
}

.avatar-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 24px;
}

.avatar-crop-modal[hidden] {
    display: none;
}

.avatar-crop-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgb(80 58 60 / 80%);
}

.avatar-crop-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: 0 24px 48px rgb(33 22 23 / 16%);
}

.avatar-crop-modal__head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.avatar-crop-modal__title {
    grid-column: 2;
    margin: 0;
    font-size: 18px;
    font-weight: var(--font-weight-medium);
    line-height: 1.33;
    letter-spacing: var(--tracking-m);
    color: var(--color-text-strong);
    text-align: center;
}

.avatar-crop-modal__close {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.avatar-crop-modal__close:hover,
.avatar-crop-modal__close:focus-visible {
    background: var(--color-surface-hover);
}

.avatar-crop-modal__hint {
    margin: 0;
    color: var(--color-header-muted);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.avatar-crop-modal__stage {
    width: 100%;
    min-height: 280px;
    max-height: min(52vh, 420px);
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-form-field-bg);
}

.avatar-crop-modal__image {
    display: block;
    max-width: 100%;
}

.avatar-crop-modal__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.avatar-crop-modal__tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-form-field-bg);
    color: var(--color-brand-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.avatar-crop-modal__tool:hover,
.avatar-crop-modal__tool:focus-visible {
    background: var(--color-surface-hover);
}

.avatar-crop-modal__tool-label {
    line-height: 1.2;
}

.avatar-crop-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.avatar-crop-modal__actions .profile-settings-btn {
    min-width: 120px;
}

.profile-payments-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-white);
}

.profile-payments-card__head,
.profile-payments-item {
    display: grid;
    grid-template-columns: 56px 140px minmax(0, 1fr) 120px 130px 110px;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
}

.profile-payments-card__head {
    min-height: 44px;
    border-bottom: 1px solid #efe8e3;
    color: #917865;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-payments-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-payments-item {
    min-height: 72px;
    border-bottom: 1px solid #f3ece7;
    color: var(--color-brand-dark);
    font-size: 14px;
    line-height: 1.35;
    transition: background-color var(--transition-ui);
}

.profile-payments-item:last-child {
    border-bottom: 0;
}

.profile-payments-item:hover {
    background: #faf7f5;
}

.profile-payments-item__id {
    color: #917865;
    font-size: 13px;
    font-weight: var(--font-weight-medium);
}

.profile-payments-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    background: #f3ece7;
    color: var(--color-brand-dark);
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.profile-payments-chip--boost {
    background: #f8efe8;
    color: #8a5a3c;
}

.profile-payments-chip--premium {
    background: #fff4dd;
    color: #9a6b00;
}

.profile-payments-chip img {
    flex-shrink: 0;
    opacity: 0.85;
}

.profile-payments-item__object {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-brand-dark);
}

.profile-payments-item__amount {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-payments-item__amount strong {
    color: var(--color-brand-dark);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.profile-payments-item__amount span {
    color: #917865;
    font-size: 12px;
}

.profile-payments-item__date {
    color: #917865;
    font-size: 13px;
    white-space: nowrap;
}

.profile-payments-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.profile-payments-status--paid {
    background: #e8f5ec;
    color: #2d7a46;
}

.profile-payments-status--pending {
    background: #fff4dd;
    color: #9a6b00;
}

.profile-payments-status--refunded {
    background: #f3ece7;
    color: #917865;
}

.profile-payments-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    background: var(--color-white);
    text-align: center;
}

.profile-payments-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #f3ece7;
}

.profile-payments-empty__icon img {
    opacity: 0.7;
}

.profile-payments-empty__title {
    margin: 0;
    color: var(--color-brand-dark);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.profile-payments-empty__text {
    margin: 10px 0 0;
    max-width: 420px;
    color: var(--color-header-muted);
    font-size: 15px;
    line-height: 1.5;
}

.profile-payments-empty__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 20px;
    padding: 0 22px;
    border-radius: var(--radius-pill);
    background: var(--color-brand-brown);
    color: var(--color-white);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-decoration: none;
    transition: background-color var(--transition-ui);
}

.profile-payments-empty__link:hover,
.profile-payments-empty__link:focus-visible {
    background: var(--color-btn-primary-hover);
}

@media (max-width: 1100px) {
    .profile-payments-card__head {
        display: none;
    }

    .profile-payments-item {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "type status"
            "object amount"
            "meta meta";
        gap: 8px 12px;
        padding: 16px 20px;
    }

    .profile-payments-item__id {
        display: none;
    }

    .profile-payments-item__type {
        grid-area: type;
    }

    .profile-payments-item__object {
        grid-area: object;
        white-space: normal;
    }

    .profile-payments-item__amount {
        grid-area: amount;
        align-items: flex-end;
        text-align: right;
    }

    .profile-payments-item__date {
        grid-area: meta;
        font-size: 12px;
    }

    .profile-payments-item__status {
        grid-area: status;
        justify-self: end;
    }
}
