* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    --like: #1f3b73;
    --dislike: #4b5563;
    --accent: #1f3b73;

    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-bg-strong: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-border-strong: rgba(255, 255, 255, 0.4);
    --glass-blur: 12px;
}

/* Общий iOS-like вид для emoji/иконок внутри стекла */
.top-actions .icon,
.assistant-icon,
.filter-btn__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
    color: #556277;
}

.top-actions .icon svg,
.assistant-icon svg,
.filter-btn__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

/* Подсветка под курсором (двигается внутри элемента) */
.glow-follow {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.glow-follow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
    background:
        radial-gradient(
            80px circle at var(--glow-x, 50%) var(--glow-y, 50%),
            rgba(255, 0, 0, 0.65) 0%,
            rgba(255, 255, 255, 0.22) 22%,
            rgba(255, 255, 255, 0) 60%
        );
    mix-blend-mode: soft-light;
}

.glow-follow:hover::before {
    opacity: 1;
}

.glow-follow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

.glow-follow:hover::after {
    opacity: 1;
}

body {
    font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
    line-height: 1.5;
}

html {
    background: var(--bg);
}

html.page-preloading body {
    overflow: hidden;
}

html.page-preloading .bg-waves,
html.page-preloading .company-tag,
html.page-preloading .page {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

html.page-preloading .top-nav {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

html.boot-complete .bg-waves,
html.boot-complete .company-tag,
html.boot-complete .page {
    animation: bootReveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.boot-complete .top-nav {
    animation: bootRevealNoTransform 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    pointer-events: auto;
}

.boot-overlay__blur {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 460px at 20% 15%, rgba(48, 116, 230, 0.22), transparent 65%),
        radial-gradient(780px 420px at 86% 90%, rgba(23, 70, 164, 0.2), transparent 67%),
        rgba(236, 242, 251, 0.66);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.boot-overlay__card {
    position: relative;
    z-index: 1;
    width: min(440px, calc(100vw - 40px));
    border-radius: 26px;
    padding: 28px 24px 24px;
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow: 0 24px 60px rgba(31, 59, 115, 0.2);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 255, 0.88));
}

.boot-overlay__logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    animation: bootLogoPulse 1.7s ease-in-out infinite;
}

.boot-overlay__title {
    font-size: 30px;
    font-weight: 800;
    color: #13326e;
    letter-spacing: 0.01em;
}

.boot-overlay__subtitle {
    font-size: 14px;
    color: #4f638d;
    font-weight: 600;
}

.boot-overlay__line {
    width: min(300px, 72vw);
    height: 6px;
    border-radius: 999px;
    margin-top: 10px;
    overflow: hidden;
    background: rgba(24, 74, 172, 0.14);
}

.boot-overlay__line span {
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2f78ed, #5aa4ff);
    animation: bootLineRun 1.25s ease-in-out infinite;
}

.boot-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 320ms ease, visibility 320ms linear;
}

@keyframes bootLineRun {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(240%); }
}

@keyframes bootLogoPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.025); }
}

@keyframes bootReveal {
    from {
        opacity: 0.7;
        filter: blur(4px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes bootRevealNoTransform {
    from {
        opacity: 0.7;
        filter: blur(4px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Рейтинг анкеты (Люди) */
.seeker-rating-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 10px;
}

.seeker-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.star-rating {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.star-rating__star {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.star-rating__star svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.star-rating__star.active {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.55);
    color: #f59e0b;
    text-shadow:
        0 0 10px rgba(245, 158, 11, 0.55),
        0 0 18px rgba(245, 158, 11, 0.25);
}

.star-rating-value {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.seeker-rating-status {
    font-weight: 700;
    color: var(--text);
}

.seeker-rating-field {
    display: grid;
    gap: 6px;
}

.seeker-rating-field__label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

.seeker-rating-comment {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.75);
    min-height: 44px;
    white-space: pre-wrap;
}

.auth-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 12px;
    align-items: end;
}

.auth-field--grow {
    min-width: 0;
}

.auth-submit--secondary {
    min-height: 56px;
    white-space: nowrap;
}

.detail-offer {
    display: grid;
    gap: 10px;
    padding: 18px;
    margin-top: 16px;
    border: 1px solid rgba(31, 59, 115, 0.08);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.95), rgba(240, 245, 255, 0.85));
}

.detail-offer__hint {
    font-size: 14px;
    color: #3869d4;
}

.detail-offer__label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.detail-offer__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 10px;
}

.detail-offer__row input {
    width: 100%;
    min-width: 0;
    border: 1px solid #d9e3f7;
    border-radius: 16px;
    min-height: 54px;
    padding: 0 16px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.detail-offer__submit {
    border: 0;
    border-radius: 16px;
    background: #e7f0ff;
    color: #2a64d6;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.detail-offer__error {
    font-size: 13px;
    color: #dc2626;
}

.detail-offer__error.is-success {
    color: #15803d;
}

[data-theme="dark"] .detail-offer {
    border-color: rgba(148, 167, 202, 0.26);
    background: linear-gradient(180deg, rgba(17, 31, 56, 0.94), rgba(13, 25, 45, 0.9));
}

[data-theme="dark"] .detail-offer__hint {
    color: #7ca9ff;
}

[data-theme="dark"] .detail-offer__row input {
    border-color: rgba(148, 167, 202, 0.3);
    background: rgba(26, 42, 72, 0.92);
    color: #e8f0ff;
}

[data-theme="dark"] .detail-offer__row input::placeholder {
    color: rgba(201, 214, 240, 0.74);
}

[data-theme="dark"] .detail-offer__submit {
    background: rgba(53, 90, 160, 0.38);
    color: #8cb4ff;
}


/* маленький чекбокс внутри create-form */
.create-field--check {
    display: grid;
    align-content: start;
}

.inline-check {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    font-weight: 700;
    color: var(--text);
}

.inline-check input {
    width: 18px;
    height: 18px;
}

.bg-waves {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: var(--bg);

    /* Убираем декоративные "волны" — фон остаётся просто белым */
    display: none;
}

.bg-wave-layer {
    position: absolute;
    inset: -25%;
    transform: scale(1.12);
    filter: blur(70px) saturate(1.35);
    opacity: 0.9;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
    will-change: clip-path, opacity, filter;
}

.bg-wave-layer.bg--image {
    background-position: center;
    background-size: cover;
}

.bg-wave-layer.bg--palette {
    /* мягкая "меш"-заливка из основных цветов фото */
    background:
        radial-gradient(60% 60% at 18% 24%, var(--c1, rgba(31, 59, 115, 0.85)) 0%, rgba(0,0,0,0) 64%),
        radial-gradient(60% 60% at 82% 22%, var(--c2, rgba(15, 98, 254, 0.75)) 0%, rgba(0,0,0,0) 62%),
        radial-gradient(70% 70% at 22% 82%, var(--c3, rgba(99, 102, 241, 0.7)) 0%, rgba(0,0,0,0) 62%),
        radial-gradient(70% 70% at 78% 86%, var(--c4, rgba(16, 185, 129, 0.55)) 0%, rgba(0,0,0,0) 62%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.06));
}

.bg-wave-layer.is-entering {
    animation: bgWaveReveal 2400ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes bgWaveReveal {
    0% {
        clip-path: polygon(
            var(--sx1, 0%) var(--sy1, 0%),
            var(--sx2, 100%) var(--sy1, 0%),
            var(--sx2, 100%) var(--sy2, 100%),
            var(--sx1, 0%) var(--sy2, 100%)
        );
        opacity: 0.05;
        filter: blur(40px) saturate(1.2);
    }
    18% {
        opacity: 0.55;
    }
    100% {
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 0.9;
        filter: blur(70px) saturate(1.35);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-wave-layer.is-entering {
        animation: none;
    }
}

.company-tag,
.top-nav,
.page {
    position: relative;
    z-index: 1;
}

.page {
    width: 100%;
    max-width: 1840px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    padding: 8px 12px 32px;
    min-height: 100vh;
    gap: 0;
}

.top-nav {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 16px);
    max-width: 1840px;
    border-radius: 22px;
    border: 1px solid rgba(133, 157, 189, 0.24);
    background: rgba(251, 253, 255, 0.86);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.09);
    padding: 8px 24px 4px;
    gap: 23px;
    display: grid;
    z-index: 80;
}

.top-nav__primary,
.top-nav__menu {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    padding: 0;
}

.top-nav__primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.top-nav__left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.city-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.city-trigger {
    border: 1px solid rgba(112, 136, 170, 0.22);
    background: rgba(255, 255, 255, 0.76);
    -webkit-backdrop-filter: blur(13px);
    backdrop-filter: blur(13px);
    color: #0f172a;
    min-height: 54px;
    padding: 8px 16px 8px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.city-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 98, 254, 0.26);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.city-trigger:active {
    transform: translateY(0);
}

.city-trigger__icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f62fe;
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.14), rgba(67, 139, 255, 0.24));
    flex-shrink: 0;
}

.city-trigger__icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.city-trigger__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.city-trigger__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6b7280;
}

.city-trigger__value {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    max-width: 148px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-nav__logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    color: #0f172a;
    cursor: pointer;
}

.logo-img {
    width: 99px;
    height: 99px;
    border-radius: 26.21px;
    display: block;
    /* background: transparent;
    background-image: url('assets/images/branding/logo.png'), url('assets/images/branding/logo-fallback.svg');
    background-size: cover, cover, cover, cover;
    background-position: center, center, center, center; */
}

.logo-mark {
    position: relative;
    width: 20px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-pin {
    width: 10px;
    height: 16px;
    border: 2px solid #0f62fe;
    border-radius: 8px 8px 10px 10px;
    display: block;
}

.logo-dot {
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #0f62fe;
    border-radius: 50%;
}

.logo-text {
    font-size: 30px;
    font-weight: 700;
    font-style: normal;
    line-height: 31px;
    letter-spacing: 0.31px;
    vertical-align: middle;
    color: #111827;
    padding-bottom: 0;
}

.logo-helper {
    color: #1f3b73;
    font-weight: 700;
    font-size: 14px;
    background: #eef3ff;
    padding: 4px 10px;
    border-radius: 10px;
}

.top-nav__right {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.create-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.assistant-btn {
    border: 1.34px solid rgba(112, 136, 170, 0.2);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(13.44px);
    backdrop-filter: blur(13.44px);
    color: #0f3d9e;
    font-weight: 700;
    padding: 0 16px;
    height: 53px;
    border-radius: 21.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 3;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0px 10.75px 26.87px 0px rgba(15, 23, 42, 0.08),
                inset 0 0 16px rgba(255, 255, 255, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    background: rgba(15, 62, 254, 0.18);
    border-color: rgba(15, 62, 254, 0.35);
    box-shadow: 0 12px 32px rgba(15, 62, 254, 0.16),
                inset 0 0 20px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.assistant-btn:active {
    transform: translateY(0px);
}

.assistant-icon {
    color: currentColor;
}

.top-nav__cta {
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.95) 0%, rgba(31, 59, 115, 0.88) 100%);
    -webkit-backdrop-filter: blur(10.75px);
    backdrop-filter: blur(10.75px);
    color: #fff;
    font-weight: 800;
    padding: 0 20px;
    height: 52px;
    border-radius: 21.5px;
    cursor: pointer;
    box-shadow: 0px 16.12px 34.93px 0px rgba(10, 132, 255, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.4),
                inset -1px -1px 0 rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.95) 0%, rgba(31, 59, 115, 0.88) 100%);
    box-shadow: 0 16px 40px rgba(15, 98, 254, 0.32),
                inset 0 1px 0 rgba(255, 255, 255, 0.4),
                inset -1px -1px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.top-nav__cta::before {
    content: '';
    position: absolute;
    width: 47px;
    height: 47px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: url('assets/images/illustrations/brokenhome_publish_button.png') center / contain no-repeat;
    opacity: 0.26;
    pointer-events: none;
    border-radius: inherit;
}

.top-nav__cta:hover {
    background: linear-gradient(135deg, rgba(15, 98, 254, 1) 0%, rgba(47, 149, 255, 1) 100%);
    box-shadow: 0 20px 48px rgba(15, 98, 254, 0.42),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.top-nav__cta:active {
    transform: translateY(0px);
}

.top-nav__login {
    border: 1.34px solid rgba(112, 136, 170, 0.2);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(13.44px);
    backdrop-filter: blur(13.44px);
    color: #0f62fe;
    font-weight: 700;
    padding: 0 20px;
    height: 52px;
    border-radius: 21.5px;
    cursor: pointer;
    box-shadow: 0px 10.75px 26.87px 0px rgba(15, 23, 42, 0.08),
                inset 0 0 16px rgba(255, 255, 255, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    background: rgba(15, 62, 254, 0.18);
    border-color: rgba(15, 62, 254, 0.35);
    box-shadow: 0 12px 32px rgba(15, 62, 254, 0.16),
                inset 0 0 20px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.top-nav__login:active {
    transform: translateY(0px);
}

/* Скрываем кнопку входа после авторизации, освобождая место в ряду */
.top-nav__login.logged {
    display: none;
}

.top-nav__menu {
    padding-bottom: 6px;
}

.top-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    width: 100%;
}

.top-menu__item {
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
}

.top-menu__item.active,
.top-menu__item:hover {
    color: #0f62fe;
}

.top-menu__item.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 3px;
    background: #0f62fe;
    border-radius: 999px;
}

.company-tag {
    display: none;
}

.content-area {
    width: 100%;
    position: relative;
    padding-top: 0;
}

.top-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

@media (min-width: 1180px) {
    .top-nav__logo {
        min-width: 260px;
    }

    .logo-text {
        min-width: 118px;
        display: inline-block;
    }

    .assistant-btn {
        min-width: 170px;
        justify-content: center;
    }

    .top-nav__cta {
        min-width: 210px;
    }

    .top-nav__login {
        min-width: 106px;
    }
}

.profile-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.profile-dropdown.open .profile-chip {
    background: rgba(31, 59, 115, 0.2);
    border-color: rgba(31, 59, 115, 0.4);
    box-shadow: 0 10px 32px rgba(31, 59, 115, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.4),
                inset -1px -1px 0 rgba(31, 59, 115, 0.1);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    z-index: 50;
}

.profile-menu__item {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.profile-menu__item:hover {
    background: rgba(15, 62, 254, 0.08);
    border-color: rgba(15, 62, 254, 0.18);
}

.profile-menu__item:active {
    background: rgba(15, 62, 254, 0.12);
}

.profile-menu__item--danger:hover {
    background: rgba(17, 24, 39, 0.08);
    border-color: rgba(17, 24, 39, 0.14);
}

.city-menu {
    left: 0;
    right: auto;
    width: 260px;
    max-height: min(360px, 65vh);
    overflow-y: auto;
}

.city-menu .profile-menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.city-menu .profile-menu__item::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(15, 98, 254, 0.2);
    flex-shrink: 0;
}

.city-menu .profile-menu__item.active {
    background: rgba(15, 62, 254, 0.08);
    border-color: rgba(15, 62, 254, 0.18);
    color: #0f3d9e;
}

.city-menu .profile-menu__item.active::after {
    background: #0f62fe;
    box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.12);
}

[data-theme="dark"] {
    --bg: #111827;
    --panel: #111827;
    --text: #ffffff;
    --muted: #6b7280;
    --border: rgba(255, 255, 255, 0.14);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.45);

    --glass-bg: rgba(17, 24, 39, 0.42);
    --glass-bg-strong: rgba(17, 24, 39, 0.56);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-strong: rgba(255, 255, 255, 0.16);
}

.profile-chip,
.like-chip,
.message-chip {
    width: 59px;
    height: 59px;
    border-radius: 21.5px;
    border: 1.34px solid rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(16.12px);
    backdrop-filter: blur(16.12px);
    box-shadow: -1.34px -1.34px 0px 1.34px rgba(0, 0, 0, 0.05) inset,
                0px 0px 26.87px 1.34px rgba(255, 255, 255, 0.30) inset,
                0px 10.75px 43px 0px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
    color: #556277;
}

.profile-chip:hover,
.like-chip:hover,
.message-chip:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1),
                inset 0 0 24px rgba(255, 255, 255, 0.4),
                inset -1px -1px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.profile-chip:active,
.like-chip:active,
.message-chip:active {
    transform: translateY(0px);
}

.profile-chip.active,
.like-chip.active,
.message-chip.active {
    background: rgba(31, 59, 115, 0.2);
    border-color: rgba(31, 59, 115, 0.4);
    box-shadow: 0 10px 32px rgba(31, 59, 115, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.4),
                inset -1px -1px 0 rgba(31, 59, 115, 0.1);
}

.content-pane {
    display: none;
}

.content-pane.has-detail.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
    margin-top: 0;
}

.content-pane.has-detail.active:has(.swipe-stage.mode-seeker) {
    grid-template-columns: 9fr 16fr;
}

.content-pane.active:not(.has-detail) {
    display: block;
}

.blank-pane {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    min-height: 720px;
    padding: 28px;
    font-weight: 700;
    color: #6b7280;
}

.profile-pane {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    padding: 24px;
    display: grid;
    gap: 20px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;

    scrollbar-color: rgba(17, 24, 39, 0.28) transparent;
    scrollbar-width: thin;
}

.content-pane[data-pane="profile"] .profile-pane::-webkit-scrollbar {
    width: 8px;
}

.content-pane[data-pane="profile"] .profile-pane::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.content-pane[data-pane="profile"] .profile-pane::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.22);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.content-pane[data-pane="profile"] .profile-pane::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 24, 39, 0.32);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.detail-panel {
    scrollbar-color: rgba(17, 24, 39, 0.28) transparent;
    scrollbar-width: thin;
}

.detail-panel::-webkit-scrollbar {
    width: 10px;
}

.detail-panel::-webkit-scrollbar-track {
    background: transparent;
}

.detail-panel::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.22);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.detail-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 24, 39, 0.32);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.chat-list {
    scrollbar-color: rgba(17, 24, 39, 0.28) transparent;
    scrollbar-width: thin;
}

.chat-list::-webkit-scrollbar {
    width: 10px;
}

.chat-list::-webkit-scrollbar-track {
    background: transparent;
}

.chat-list::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.22);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.chat-list::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 24, 39, 0.32);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.profile-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f7fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #536079;
}

.profile-avatar svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-title {
    font-weight: 800;
    font-size: 18px;
}

.profile-sub {
    color: #6b7280;
    font-size: 14px;
}

.profile-login {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 12px;
}

.profile-login input {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0 12px;
}

.profile-login button {
    height: 42px;
    border-radius: 10px;
    border: none;
    background: #ff4458;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.profile-login.hidden {
    display: none;
}

.profile-logout {
    margin-left: auto;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-logout:hover {
    background: #f5f7fb;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.profile-logout:active {
    transform: translateY(1px);
}

.profile-logout.hidden {
    display: none;
}

.create-listing-btn {
    width: 100%;
    justify-self: start;
    margin-top: -4px;
}

.profile-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.profile-card[data-section] {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.profile-card[data-section]:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.06);
}

.profile-card[data-section]:active {
    transform: translateY(1px);
}

.profile-card--active {
    border-color: var(--accent);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
}

.profile-section-view {
    display: grid;
    gap: 16px;
}

.profile-section {
    display: none;
}

.profile-section.active {
    display: block;
}

.posted-list {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    background: #f8fafc;
    display: grid;
    gap: 10px;
}

.posted-actions {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.posted-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.posted-item:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.posted-item:active {
    transform: translateY(1px);
}

.posted-item__title {
    font-weight: 800;
}

.posted-item__meta {
    color: #6b7280;
    font-size: 13px;
}

.posted-item__price {
    font-weight: 700;
}

.history-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    display: grid;
    gap: 14px;
}

.history-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.history-block__title {
    font-weight: 800;
    font-size: 16px;
}

.history-block__sub {
    color: #6b7280;
    font-size: 13px;
    margin-top: 2px;
}

.history-block__clear {
    height: 36px;
    padding: 0 12px;
}

.history-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.history-column {
    display: grid;
    gap: 10px;
}

.history-column__title {
    font-weight: 700;
}

.history-list {
    display: grid;
    gap: 10px;
    min-height: 44px;
    color: #6b7280;
}

.history-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #f8fafc;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.history-item:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.history-item:active {
    transform: translateY(1px);
}

.history-item__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.history-item__title {
    font-weight: 700;
    color: #111827;
}

.history-item__meta {
    color: #6b7280;
    font-size: 13px;
}

.history-item__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
}

.history-item__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.history-item__badge.like {
    background: rgba(31, 59, 115, 0.08);
    color: #1f3b73;
}

.history-item__badge.dislike {
    background: rgba(255, 68, 88, 0.08);
    color: #ff4458;
}

.history-item__price {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.create-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
}

.create-modal.open {
    pointer-events: auto;
}

.create-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.create-modal.open .create-modal__backdrop {
    opacity: 1;
}

.create-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: min(620px, 94vw);
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(10px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.create-modal.open .create-modal__panel {
    opacity: 1;
    transform: translateY(0);
}

.create-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.create-modal__title {
    font-weight: 800;
    font-size: 18px;
}

.create-modal__close {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.create-form {
    display: grid;
    gap: 12px;
}

.create-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.create-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}

.create-field input,
.create-field textarea,
.create-field select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}

.create-field textarea {
    resize: vertical;
}

.create-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.liked-list {
    display: grid;
    gap: 12px;
}

.favorites-pane {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    padding: 18px;
    display: grid;
    gap: 14px;
    max-height: calc(100vh - 140px);
    overflow: hidden;
}

.favorites-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.favorites-title {
    font-weight: 900;
    font-size: 20px;
    color: var(--text);
}

.favorites-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.55);
}

.favorites-tab {
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 900;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.favorites-tab.active {
    background: rgba(15, 62, 254, 0.12);
    border-color: rgba(15, 62, 254, 0.22);
    color: #0f62fe;
}

.profile-list-tab {
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 900;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.profile-list-tab.active {
    background: rgba(15, 62, 254, 0.12);
    border-color: rgba(15, 62, 254, 0.22);
    color: #0f62fe;
}

.profile-fav-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-fav-head--with-action {
    justify-content: space-between;
}

.profile-fav-main {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.profile-fav-list {
    display: grid;
}

.favorites-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    min-height: 0;
    margin-top: 6px;
}

.favorites-sidebar {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    min-height: 0;
}

.favorites-side-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid transparent;
    background: transparent;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 900;
    color: var(--text);
}

.favorites-side-item.active,
.favorites-side-item:hover {
    background: rgba(15, 62, 254, 0.08);
    border-color: rgba(15, 62, 254, 0.18);
}

.favorites-side-item__count {
    font-size: 12px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(15, 62, 254, 0.18);
    background: rgba(15, 62, 254, 0.1);
    color: #0f62fe;
}

.favorites-main {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto 1fr;
}

.favorites-toolbar {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.favorites-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: var(--text);
}

.favorites-toolbar__meta {
    color: var(--muted);
    font-weight: 900;
    margin-right: auto;
}

.favorites-sort {
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.85);
    font-weight: 900;
    color: var(--text);
}

.favorites-filter,
.favorites-delete,
.favorites-collection {
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.85);
    font-weight: 900;
    color: var(--text);
    cursor: pointer;
}

.favorites-delete:disabled {
    opacity: 0.5;
    cursor: default;
}

.favorites-collection:disabled {
    opacity: 0.5;
    cursor: default;
}

.favorites-groups {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    display: grid;
    gap: 10px;
}

.favorites-groups__title {
    font-weight: 900;
    color: var(--text);
    font-size: 13px;
}

.favorites-group-create {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(15, 62, 254, 0.18);
    background: rgba(15, 62, 254, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 900;
    color: #0f62fe;
}

.favorites-group-create__icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(15, 62, 254, 0.18);
    background: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    font-weight: 900;
}

.favorites-groups__list {
    display: grid;
    gap: 8px;
}

.favorites-group-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    align-items: center;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.55);
    padding: 10px 12px;
    cursor: pointer;
}

.favorites-group-item:hover {
    border-color: rgba(17, 24, 39, 0.12);
}

.favorites-group-item.active {
    border-color: rgba(15, 62, 254, 0.22);
    background: rgba(15, 62, 254, 0.08);
}

.favorites-group-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(17, 24, 39, 0.55);
    font-weight: 900;
}

.favorites-group-thumb svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.favorites-group-name {
    font-weight: 900;
    color: var(--text);
}

.favorites-group-meta {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 900;
    color: var(--muted);
}

.group-menu {
    position: fixed;
    min-width: 240px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    z-index: 60;
}

.group-menu__item {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-weight: 900;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.group-menu__item:hover {
    background: rgba(15, 62, 254, 0.08);
    border-color: rgba(15, 62, 254, 0.18);
}

.favorites-filters {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.favorites-filter-chip {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.14);
    background: rgba(255, 255, 255, 0.7);
    font-weight: 900;
    color: var(--text);
    cursor: pointer;
}

.favorites-filter-chip.active {
    border-color: rgba(15, 62, 254, 0.24);
    background: rgba(15, 62, 254, 0.12);
    color: #0f62fe;
}

.favorites-list {
    overflow: auto;
    min-height: 0;
}

.favorites-empty {
    padding: 18px;
    color: var(--muted);
    font-weight: 900;
}

.fav-row {
    display: grid;
    grid-template-columns: 34px 120px 1fr 140px auto;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    align-items: center;
    cursor: pointer;
}

.fav-row:hover {
    background: rgba(15, 62, 254, 0.06);
}

.fav-row__check {
    display: flex;
    justify-content: center;
}

.fav-row__thumb {
    width: 120px;
    height: 78px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.6);
}

.fav-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fav-row__title {
    font-weight: 900;
    color: var(--text);
}

.fav-row__status {
    display: inline-flex;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.38);
}

.fav-row__meta {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.fav-row__price {
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-row--no-check {
    grid-template-columns: 120px 1fr 140px auto;
}

@media (max-width: 980px) {
    .fav-row--no-check {
        grid-template-columns: 96px 1fr;
        grid-template-areas:
            "thumb body"
            "price actions";
    }
}

.fav-row__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fav-row__btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(17, 24, 39, 0.16);
    background: rgba(255, 255, 255, 0.9);
    color: #0f62fe;
    font-weight: 900;
    cursor: pointer;
}

.fav-row__btn--muted {
    color: #334155;
}

.fav-row__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(17, 24, 39, 0.16);
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.fav-row__icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #667085;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 980px) {
    .favorites-layout {
        grid-template-columns: 1fr;
    }

    .favorites-sidebar {
        display: none;
    }

    .fav-row {
        grid-template-columns: 34px 96px 1fr;
        grid-template-areas:
            "check thumb body"
            "check price actions";
        align-items: start;
    }

    .fav-row__check { grid-area: check; }
    .fav-row__thumb { grid-area: thumb; width: 96px; height: 70px; }
    .fav-row__body { grid-area: body; }
    .fav-row__price { grid-area: price; }
    .fav-row__actions { grid-area: actions; justify-content: flex-end; }
}

.liked-sections {
    display: grid;
    gap: 16px;
}

.liked-section {
    display: grid;
    gap: 10px;
}

.liked-section__title {
    font-weight: 800;
}

.liked-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #f8fafc;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.liked-card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.liked-card:active {
    transform: translateY(1px);
}

.liked-card__actions {
    margin-top: 6px;
    display: flex;
}

.liked-card__write {
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.liked-card__write:hover {
    background: #f4f6fa;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.liked-card__write:active {
    transform: translateY(1px);
}

.liked-card__title {
    font-weight: 800;
}

.liked-card__meta {
    color: var(--muted);
    font-size: 13px;
}

.liked-card__price {
    font-weight: 800;
}

.profile-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    background: #f8fafc;
    display: grid;
    gap: 6px;
}

.profile-card-title {
    font-weight: 700;
}

.profile-card-value {
    font-size: 22px;
    font-weight: 800;
}

.profile-card-note {
    color: #6b7280;
    font-size: 13px;
}

.profile-card--link {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-card--link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.app-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.swipe-header {
    display: none;
}

.brand {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.hint {
    color: var(--muted);
    font-size: 14px;
}

.swipe-stage {
    background: rgba(251, 253, 255, 0.86);
    border: 0.99px solid rgba(120, 145, 178, 0.2);
    border-radius: 23.87px;
    -webkit-backdrop-filter: blur(11.93px);
    backdrop-filter: blur(11.93px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.9),
                inset 0 -1px 0 rgba(120, 145, 178, 0.1);
    padding: 16px 18px 16px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.swipe-toolbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mode-switch {
    position: relative;
    display: inline-flex;
    gap: 8px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(17, 24, 39, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05),
                inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.mode-switch::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: var(--indicator-x, 4px);
    width: var(--indicator-w, 0px);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(31, 59, 115, 0.18);
    box-shadow: 0 12px 24px rgba(31, 59, 115, 0.15),
                inset 0 0 16px rgba(255, 255, 255, 0.3);
    transition: left 280ms cubic-bezier(0.22, 1, 0.36, 1),
                width 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: left, width;
    pointer-events: none;
}

.mode-btn {
    position: relative;
    z-index: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
    color: var(--muted);
    transition: color 0.2s ease, transform 0.15s ease;
}

.mode-btn.active {
    color: var(--accent);
    transform: translateY(-1px);
}

.mode-btn:active {
    transform: translateY(0px) scale(0.99);
}

.mode-btn:hover:not(:active) {
    transform: translateY(-2px) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
    .mode-switch::before {
        transition: none;
    }

    .mode-btn {
        transition: color 0.2s ease;
    }

    .mode-btn.active,
    .mode-btn:hover:not(:active),
    .mode-btn:active {
        transform: none;
    }
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    border-top: 1.48px solid #7088AA33;
    background: #FFFFFFB8;
    -webkit-backdrop-filter: blur(17.707px);
    backdrop-filter: blur(17.707px);
    color: var(--accent);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0px 11.8px 29.51px 0px #0F172A14,
                inset 0 0 20px rgba(255, 255, 255, 0.4),
                inset -1px -1px 0 rgba(0, 0, 0, 0.04);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0px 14px 34px 0px #0F172A1A,
                inset 0 0 26px rgba(255, 255, 255, 0.5),
                inset -1px -1px 0 rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.filter-btn:active {
    transform: translateY(0px);
}

.filter-btn__icon {
    color: currentColor;
}

.cards-viewport {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    height: 630px;
}

.card {
    width: 100%;
    height: 100%;
    background: #f5f7fb;
    border-radius: 20px;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: var(--shadow);
    border: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center center;
}

.view-btn {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border 0.2s ease;
    z-index: 2;
    pointer-events: auto;
}

.view-btn svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    stroke-width: 2.2;
    fill: none;
}

.view-btn:active {
    transform: scale(0.95);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 18px 18px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 78%);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-title {
    font-weight: 800;
    font-size: 19px;
}

.card-meta {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.78);
}

.card-badge {
    position: absolute;
    top: 18px;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.card-badge.like {
    right: 18px;
    background: rgba(255, 68, 88, 0.9);
}

.card-badge.dislike {
    left: 18px;
    background: rgba(75, 85, 99, 0.9);
}

.image-indicators {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    gap: 6px;
}

.image-indicators span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: transform 0.2s ease, background 0.2s ease;
}

.image-indicators span.active {
    background: #fff;
    transform: scale(1.12);
}

.actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.action-btn {
    flex: 1;
    height: 80px;
    border-radius: 26px;
    border: 0.788px solid rgba(112, 136, 170, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(4.728px);
    backdrop-filter: blur(4.728px);
    cursor: pointer;
    box-shadow: 0px 7.881px 17.337px 0px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
}

.action-btn img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.like img {
    width: 75px;
    height: 75px;
}

.action-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-btn:active {
    transform: scale(0.94);
}

.dislike svg {
    stroke: var(--dislike);
    fill: none;
}

.like svg {
    stroke: var(--like);
    fill: none;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.97);
    transform: translateY(-2px);
}

.divider {
    width: 0.788px;
    height: 27px;
    background: #e5e7eb;
    flex-shrink: 0;
}

/* Property listings: fixed-width buttons centered */
.swipe-stage:not(.mode-seeker) .actions {
    justify-content: center;
}

.swipe-stage:not(.mode-seeker) .action-btn {
    flex: 0 0 auto;
    width: min(58%, 280px);
}



/* Seeker mode — fill column (grid handles width via 1fr 2fr) */
.swipe-stage.mode-seeker {
    width: 100%;
    max-width: none;
    margin: 0;
    background: rgba(251, 253, 255, 0.35);
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    border-color: rgba(120, 145, 178, 0.1);
    overflow: hidden;
    flex: 1 1 auto;
}

.swipe-stage:not(.mode-seeker) {
    flex: 1 1 auto;
}

.swipe-stage.mode-seeker > * {
    position: relative;
    z-index: 1;
}

.swipe-stage.mode-seeker .cards-viewport {
    max-width: none;
    width: 100%;
    margin: 0;
    height: 100%;
}

/* Photo thumbnail strip */
.card-thumbs {
    display: flex;
    gap: 11px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    padding: 4px 2px;
    box-sizing: border-box;
    align-items: center;
}

.card-thumbs::-webkit-scrollbar {
    display: none;
}

.card-thumbs.hidden {
    display: none;
}

.card-thumb {
    flex-shrink: 0;
    width: 180px;
    height: 125px;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(120, 145, 178, 0.2);
    box-shadow: 0px 16px 36px rgba(43, 71, 112, 0.13);
    background: rgba(251, 253, 255, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-thumb.active {
    border-color: rgba(47, 134, 255, 0.6);
    box-shadow: 0px 16px 36px rgba(43, 71, 112, 0.2);
    transform: scale(1.03);
}

.card-thumb:hover:not(.active) {
    border-color: rgba(120, 145, 178, 0.45);
    transform: scale(1.015);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-weight: 600;
}

.hidden {
    display: none !important;
}

#detailOfferBlock {
    display: none !important;
}

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.image-modal.open {
    opacity: 1;
    pointer-events: all;
}

.image-modal__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal__img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 18px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    object-fit: contain;
    display: block;
}

.image-modal__thumbs {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Эффект выбора: кнопка чуть больше и ближе при наведении */
.glow-follow {
    transform: translateZ(0);
    will-change: transform;
}

.glow-follow:hover:not(:active) {
    transform: translateY(-2px) scale(1.04);
}

.mode-switch.glow-follow:hover:not(:active) {
    transform: none;
}

.image-modal__thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease;
    background: rgba(255, 255, 255, 0.08);
}

.image-modal__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-modal__thumb.active {
    border-color: #ffd60a;
    transform: translateY(-2px);
}

.image-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.image-modal__nav svg {
    width: 22px;
    height: 22px;
    stroke: #111827;
    stroke-width: 2.4;
    fill: none;
}

.image-modal__nav.prev { left: -64px; }
.image-modal__nav.next { right: -64px; }

.image-modal__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.image-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: #111827;
    stroke-width: 2.4;
    fill: none;
}

.detail-panel {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding-right: 6px;
}

.detail-card {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    padding: 20px 24px 20px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    display: grid;
    gap: 10px;
}

.detail-transport {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
}

.detail-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.feature {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 13.59px;
    background: #f0f3f8;
}

.feature-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5b6475;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.detail-transport__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0a84ff;
    display: inline-block;
    margin-right: 8px;
    transform: translateY(-1px);
}

.feature-label {
    font-size: 16px;
    font-weight: 400;
    line-height: 22.08px;
    letter-spacing: 0.18px;
    color: #697A90;
}

.feature-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 27.18px;
    letter-spacing: 0.18px;
    color: #102447;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.owner-card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(112, 136, 170, 0.2);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.owner-card__header {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.owner-card__photo-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    border: 1px solid rgba(112, 136, 170, 0.2);
    overflow: hidden;
    background: #f0f3f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.owner-card__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.owner-card__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.owner-card__name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.owner-card__name {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.owner-card__online {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    color: rgba(103, 199, 87, 0.95);
    letter-spacing: 0.16px;
}

.owner-card__online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(103, 199, 87, 0.95);
    flex-shrink: 0;
}

.owner-card__stat {
    font-size: 12px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.16px;
    line-height: 18.2px;
}

.owner-card__stat-key {
    font-weight: 700;
    color: #000;
}

.owner-card__stat-val {
    color: #a3a3a3;
}

.owner-card__desc-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.owner-card__desc-label {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.16px;
}

.owner-card__desc-text {
    font-size: 13px;
    font-weight: 700;
    color: #dfdfdf;
    letter-spacing: 0.16px;
    line-height: 18.2px;
}

.seeker-info-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.seeker-info-section__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 25.5px;
    letter-spacing: 0.16px;
    color: var(--text);
    margin-bottom: 10px;
}

.seeker-info-cards {
    display: inline-grid;
    grid-template-columns: repeat(4, max-content);
    gap: 8px;
}

.seeker-info-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(112, 136, 170, 0.2);
    background: rgba(255, 255, 255, 0.55);
}

/* 2-column variant (habits section) */
.seeker-info-cards--2col {
    grid-template-columns: repeat(2, max-content);
}

.seeker-info-card__label {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.14px;
    color: #697A90;
}

.seeker-info-card__value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.14px;
    color: var(--text);
}

.seeker-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.seeker-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(112, 136, 170, 0.2);
    background: rgba(255, 255, 255, 0.55);
    width: max-content;
}

.seeker-chip__label {
    font-size: 15px;
    font-weight: 600;
    color: #697A90;
    line-height: 1.3;
    letter-spacing: 0.14px;
}

.seeker-chip__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    letter-spacing: 0.14px;
}

.info-group h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.info-group ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.info-group li {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 10.81px;
    border: 0.9px solid var(--border);
    font-size: 14px;
}

.info-group li:last-child {
    border: 0.9px solid var(--border);
}

.info-group li span:first-child {
    font-size: 16.21px;
    font-weight: 700;
    line-height: 16.4px;
    letter-spacing: 0.14px;
    color: #697A90;
}

.info-group li span:last-child {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #102447;
}

.detail-header-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.detail-title {
    font-size: 45px;
    font-weight: 700;
    line-height: 30px;
    letter-spacing: 0.16px;
    color: #102447;
}

.detail-card.is-seeker .detail-title {
    font-size: 45px;
    font-weight: 700;
    font-style: normal;
    line-height: 30px;
    letter-spacing: 0.16px;
    vertical-align: middle;
    color: #102447;
}

.detail-card.is-seeker .detail-features {
    display: none;
}

.detail-card.is-seeker .feature {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
}

.detail-card.is-seeker .feature-icon {
    display: none;
}

.detail-card.is-seeker .feature-label {
    font-size: 13px;
    font-weight: 600;
    color: #697A90;
    line-height: 1.3;
}

.detail-card.is-seeker .feature-value {
    font-size: 15px;
    font-weight: 700;
    color: #102447;
    line-height: 1.3;
}

.seeker-guarantee-verified.has-verification::before {
    content: '✓ ';
    color: #22c55e;
}

.seeker-info-cards--guarantees {
    grid-template-columns: repeat(3, 1fr);
}

.detail-location,
.detail-metro {
    font-size: 21.1px;
    font-weight: 400;
    line-height: 20.3px;
    letter-spacing: 0.16px;
    color: #697A90;
}

.detail-price-row {
    display: grid;
    gap: 6px;
}

.price {
    font-size: 35px;
    font-weight: 700;
    color: #102447;
    line-height: 45px;
    letter-spacing: 0.16px;
}

.price-note {
    font-size: 18.1px;
    font-weight: 400;
    line-height: 19.5px;
    letter-spacing: 0.16px;
    color: #697A90;
}

.detail-description h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 25.5px;
    letter-spacing: 0.16px;
    color: #102447;
    margin-bottom: 8px;
}

.detail-description p {
    font-size: 20px;
    font-weight: 400;
    line-height: 25.6px;
    letter-spacing: 0.16px;
    color: #111827;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-description p.is-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-description__toggle {
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: #1f66d8;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.detail-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.primary-btn,
.ghost-btn {
    border-radius: 16px;
    border: 1px solid var(--border);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: var(--accent) url('assets/images/ui/show_phone_number.png') center / cover no-repeat;
    color: #fff;
    border: none;
    border-radius: 16.08px;
    height: 65px;
    box-shadow: 0px 12.06px 28.15px 0px rgba(31, 59, 115, 0.22);
}

.ghost-btn {
    background: url('assets/images/ui/send_message.png') center / cover no-repeat;
    color: var(--accent);
    border-radius: 16.13px;
    height: 66px;
    border: 1.01px solid rgba(112, 136, 170, 0.2);
    box-shadow: 0px 8.06px 20.16px 0px rgba(15, 23, 42, 0.08);
}

.primary-btn:active,
.ghost-btn:active {
    transform: translateY(1px);
}

.map-block {
    display: grid;
    gap: 8px;
}

.map-title {
    font-weight: 700;
}

.map-placeholder {
    height: 200px;
    border-radius: 12px;
    background: #f4f6fb;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

.map-frame {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 12px;
    background: #f4f6fb;
}

.filter-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.filter-modal.open {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}

.filter-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.filter-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 20px 20px 18px;
    width: min(480px, 92vw);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
    display: grid;
    gap: 16px;
    z-index: 1;
}

.auth-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.auth-modal.open {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.auth-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 18px 18px 16px;
    width: min(420px, 92vw);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.2);
    display: grid;
    gap: 14px;
    z-index: 1;
}

.auth-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-modal__title {
    font-weight: 800;
    font-size: 18px;
}

.auth-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f6f7fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.auth-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: #111827;
    stroke-width: 2.2;
    fill: none;
}

.auth-modal__close:active {
    transform: scale(0.97);
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.auth-mode__btn {
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f4f6fb;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.auth-mode__btn--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-mode__btn.active {
    background: #eaf0ff;
    color: var(--accent);
    border-color: #c9d8ff;
}

.auth-field {
    display: grid;
    gap: 6px;
}

.auth-label {
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
}

.auth-field input {
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0 12px;
    font-weight: 700;
    background: #f7f8fb;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    width: 100%;
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.auth-password-toggle:hover {
    background: rgba(31, 59, 115, 0.08);
    color: var(--text);
}

.auth-password-toggle:focus-visible {
    outline: 2px solid rgba(39, 123, 245, 0.35);
    outline-offset: 1px;
}

.auth-password-toggle__icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.auth-flow__btn {
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f3f6fb;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.auth-flow__btn.active {
    background: #eaf0ff;
    border-color: #c9d8ff;
    color: var(--accent);
}

.auth-otp {
    display: grid;
    gap: 8px;
}

.auth-otp__send {
    height: 42px;
}

.auth-submit {
    height: 46px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(31, 59, 115, 0.18);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-error {
    border-radius: 10px;
    border: 1px solid #f5c2c7;
    background: #fff5f5;
    color: #9f1239;
    font-weight: 700;
    padding: 10px 12px;
    font-size: 13px;
}

.auth-error.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-page__card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.18);
    padding: 20px;
    display: grid;
    gap: 14px;
}

.auth-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-page__header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
}

.auth-page__sub {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.auth-page__back,
.auth-page__footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.auth-page__back:hover,
.auth-page__footer a:hover {
    text-decoration: underline;
}

.auth-page__footer {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.auth-screen {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
    z-index: 1;
}

.auth-hero {
    display: grid;
    gap: 18px;
    color: var(--text);
    padding: 12px 4px;
}

.auth-brand {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 32px;
    font-weight: 900;
}

.auth-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.auth-hero__pill {
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(155, 176, 220, 0.4);
    color: var(--accent);
    font-weight: 800;
    backdrop-filter: blur(16px);
}

.auth-hero__title {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.auth-hero__text {
    margin: 0;
    max-width: 520px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
    font-weight: 600;
}

.auth-hero__points {
    display: grid;
    gap: 10px;
}

.auth-hero__point {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(183, 197, 231, 0.45);
    box-shadow: 0 14px 34px rgba(86, 108, 156, 0.08);
    font-weight: 700;
}

.auth-stage {
    display: grid;
}

.auth-page__card--wide {
    width: min(560px, 100%);
    padding: 24px;
    border-radius: 28px;
    border-color: rgba(183, 197, 231, 0.55);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.92)),
        rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 80px rgba(40, 67, 114, 0.14);
    backdrop-filter: blur(24px);
}

.auth-page__header--stack {
    align-items: flex-start;
}

.auth-page__eyebrow {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b86c4;
}

.auth-mode--glass {
    padding: 6px;
    border-radius: 18px;
    background: #eef3ff;
    border: 1px solid rgba(183, 197, 231, 0.7);
}

.auth-form--page {
    gap: 16px;
}

.auth-panel {
    display: grid;
    gap: 16px;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-field select {
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0 12px;
    font-weight: 700;
    background: #f7f8fb;
    color: var(--text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b98b7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.auth-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(183, 197, 231, 0.5);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(86, 108, 156, 0.12);
    color: #556b8e;
}

.auth-theme-toggle:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(86, 108, 156, 0.18);
}

.auth-theme-toggle:active {
    transform: scale(0.96);
}

.auth-theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.auth-theme-toggle__moon path {
    fill: currentColor;
    stroke: none;
}

.auth-panel__actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 12px;
}

.auth-steps {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    gap: 12px;
}

.auth-steps__item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8b98b7;
    font-weight: 800;
    transition: color 0.24s ease, transform 0.24s ease;
}

.auth-steps__item span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf2ff;
    border: 1px solid rgba(183, 197, 231, 0.6);
}

.auth-steps__item.active {
    color: var(--text);
    transform: translateY(-1px);
}

.auth-steps__item.active span {
    background: linear-gradient(135deg, #2d80ff, #6aa7ff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(45, 128, 255, 0.28);
}

.auth-steps__line {
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(45, 128, 255, 0.45), rgba(183, 197, 231, 0.45));
}

.auth-otp-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(45, 128, 255, 0.08), rgba(255, 255, 255, 0.85));
    border: 1px solid rgba(141, 170, 229, 0.45);
}

.auth-otp-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d80ff, #86b9ff);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    box-shadow: 0 12px 24px rgba(45, 128, 255, 0.2);
}

.auth-otp-card__title {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 4px;
}

.auth-otp-card__text {
    color: var(--muted);
    font-weight: 600;
}

.auth-inline--stack-mobile {
    align-items: end;
}

.auth-submit--ghost {
    background: #eef3ff;
    color: var(--accent);
    box-shadow: none;
}

.top-nav__login.logged {
    background: #eef3ff;
    border-color: #c7d7ff;
    color: var(--accent);
}

.filter-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-modal__title {
    font-weight: 800;
    font-size: 18px;
}

.filter-modal__close {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #f6f7fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.filter-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: #111827;
    stroke-width: 2.2;
    fill: none;
}

.filter-modal__close:active {
    transform: scale(0.97);
}

.filter-group {
    display: grid;
    gap: 10px;
}

.filter-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.pill-toggle {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f7f8fb;
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.pill-btn.active {
    background: #e9f0ff;
    border-color: #c7d7ff;
    color: var(--accent);
    box-shadow: 0 8px 18px rgba(31, 59, 115, 0.12);
}

.pill-btn:active {
    transform: translateY(1px);
}

.filter-checkboxes {
    display: grid;
    gap: 10px;
}

.filter-checkbox {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f7f8fb;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.filter-checkbox:hover {
    border-color: #d7dce3;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
    background: #f1f4f9;
}

.price-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.price-input {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f7f8fb;
}

.price-input input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-weight: 700;
    font-size: 14px;
}

.price-placeholder {
    color: var(--muted);
    font-size: 13px;
}

.price-suffix {
    color: var(--muted);
    font-weight: 700;
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.messages-pane {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: stretch;
    height: calc(100vh - 140px);
    min-height: 540px;
}

.content-pane[data-pane="messages"] {
    margin-top: 56px;
}

.chat-list {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
}

.chat-list__empty {
    padding: 10px;
    color: var(--muted);
    font-weight: 600;
}

.chat-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #f9fbff;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
}

.chat-item__thumb {
    width: 64px;
    height: 54px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.75);
}

.chat-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-item__body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.chat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.06);
    border-color: #d6deed;
}

.chat-item.active {
    border-color: var(--accent);
    box-shadow: 0 12px 28px rgba(31, 59, 115, 0.14);
    background: #eef3ff;
}

.chat-item__title {
    font-weight: 800;
    font-size: 14px;
}

.chat-item__meta {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.chat-item__meta span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-item__meta span:last-child {
    white-space: nowrap;
}

.chat-window {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    padding: 16px;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 12px;
    height: 100%;
    min-height: 0;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    border-radius: 12px;
    padding: 6px 10px;
    transition: background-color 0.15s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.chat-header:hover {
    background: #f1f5ff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.chat-header:active {
    transform: translateY(1px);
}

.chat-header:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.chat-title {
    font-weight: 800;
    font-size: 18px;
}

.chat-subtitle {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.chat-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef3ff;
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

.chat-body {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #f7f9fc;
    overflow-y: auto;
    display: grid;
    gap: 10px;
    align-content: start;
    align-items: start;
    justify-items: start;
    min-height: 0;
}

.chat-body::-webkit-scrollbar,
.chat-list::-webkit-scrollbar {
    width: 10px;
}

.chat-body::-webkit-scrollbar-track,
.chat-list::-webkit-scrollbar-track {
    background: #eef2f6;
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb,
.chat-list::-webkit-scrollbar-thumb {
    background: #c9d2e3;
    border-radius: 10px;
    border: 2px solid #eef2f6;
}

.chat-body::-webkit-scrollbar-thumb:hover,
.chat-list::-webkit-scrollbar-thumb:hover {
    background: #b2bfd8;
}

.chat-empty {
    color: var(--muted);
    font-weight: 700;
}

.bubble {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
    display: inline-block;
}

.bubble--user {
    margin-left: auto;
    background: #eef3ff;
    border-color: #d5def7;
}

.bubble__text {
    font-weight: 600;
}

.bubble__meta {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}

.chat-templates {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-template-btn {
    border: 1px solid var(--border);
    background: #f7f9fc;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.chat-template-btn:hover {
    transform: translateY(-1px);
    border-color: #d6deed;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.chat-input {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
}

.chat-input input {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0 14px;
    font-weight: 700;
}

.chat-input button {
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.18s ease;
    box-shadow: 0 12px 24px rgba(31, 59, 115, 0.18);
}

.chat-input button:active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .page {
        grid-template-columns: 1fr;
        padding: 20px 16px 32px;
    }

    .side-nav {
        min-height: auto;
    }

    .swipe-stage {
        padding: 16px 14px;
        width: 100%;
    }
    
    .cards-viewport {
        height: 520px;
    }

    .messages-pane {
        grid-template-columns: 1fr;
        height: calc(100vh - 120px);
    }

    .chat-window {
        height: 100%;
    }

    .chat-list {
        height: 100%;
    }

    .actions {
        width: 100%;
        justify-content: space-between;
    }

    .content-pane[data-pane="messages"] {
        margin-top: 32px;
    }
}

/* ===== iOS Friendly Theme Overrides ===== */
:root {
    --bg: linear-gradient(180deg, #f6f7fb 0%, #eef2f8 100%);
    --panel: rgba(255, 255, 255, 0.88);
    --text: #0b1220;
    --muted: #6b7280;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
    --accent: #0a84ff;
    --like: #0a84ff;
    --dislike: #8e8e93;
}

html,
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background: #eef2f8;
}

body {
    background-image: radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 45%),
        radial-gradient(circle at 88% 18%, rgba(226, 240, 255, 0.7), rgba(226, 240, 255, 0) 40%),
        linear-gradient(180deg, #f6f7fb, #edf2f8);
    letter-spacing: 0.01em;
}

.logo-img {
    border-radius: 18px;
}

.top-menu__item {
    font-weight: 600;
    color: #394150;
    padding: 10px 0;
}

.top-menu__item.active,
.top-menu__item:hover {
    color: #0b1220;
}

.top-nav__cta,
.top-nav__login,
.assistant-btn,
.profile-chip,
.like-chip,
.message-chip,
.filter-btn,
.primary-btn,
.ghost-btn,
.auth-submit,
.create-actions .ghost-btn,
.create-actions .primary-btn {
    border-radius: 16px;
}

.top-nav__cta {
    background: linear-gradient(180deg, #2f95ff 0%, #0a84ff 100%);
    box-shadow: 0 12px 26px rgba(10, 132, 255, 0.28);
}

.top-nav__login,
.assistant-btn,
.filter-btn,
.ghost-btn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
    color: #0b1220;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.mode-switch {
    border-radius: 24.49px;
    background: rgba(255, 255, 255, 0.72);
    border: 1.36px solid rgba(112, 136, 170, 0.2);
    padding: 6px;
    box-shadow: 0px 10.88px 29.93px 0px rgba(15, 23, 42, 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(16.32px);
    -webkit-backdrop-filter: blur(16.32px);
}

.mode-switch::before {
    border-radius: 19.04px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F7FB 100%);
    box-shadow: 0px 5.44px 19.04px 0px rgba(15, 23, 42, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mode-btn {
    border-radius: 19.04px;
    font-weight: 650;
}

.card,
.detail-card,
.favorites-pane,
.profile-pane,
.chat-window,
.chat-list,
.create-modal__panel,
.auth-modal__panel,
.filter-modal__panel {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--panel);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.card {
    border-radius: 28px;
}

.card img {
    border-radius: 22px;
}

.detail-buttons .primary-btn,
.detail-buttons .ghost-btn,
.action-btn {
    min-height: 52px;
    font-weight: 700;
}

.detail-buttons .ghost-btn {
    background: url('assets/images/ui/send_message.png') center / cover no-repeat;
    color: var(--accent);
    border: 1.01px solid rgba(112, 136, 170, 0.2);
}

.action-btn {
    border-radius: 12px;
}

.profile-login input,
.create-field input,
.create-field textarea,
.create-field select,
.auth-field input,
.chat-input input,
.price-input input {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    min-height: 46px;
}

.chat-input {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
}

.auth-mode__btn {
    border-radius: 14px;
}

.auth-error {
    border-radius: 12px;
}

@media (max-width: 900px) {
    .top-nav {
        top: 8px;
        width: calc(100% - 16px);
        border-radius: 18px;
        padding: 8px 12px 4px;
    }

    .card,
    .detail-card,
    .favorites-pane,
    .profile-pane,
    .chat-window {
        border-radius: 20px;
    }
}

/* ===== Responsive & Layout Fixes (Phone/Tablet/Desktop) ===== */
html,
body {
    height: 100%;
}

body {
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

.page {
    min-height: calc(100dvh - 84px);
    padding-bottom: 18px;
}

.content-area,
.content-pane.active {
    min-height: 0;
}

.content-pane.has-detail.active {
    grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
    align-items: stretch;
    min-height: calc(100dvh - 178px);
}

.app-shell {
    min-width: 0;
}

.swipe-stage {
    width: 100%;
    max-width: none;
}

.cards-viewport {
    width: 100%;
    max-width: 100%;
    min-height: 340px;
    height: min(64dvh, 640px);
}

.card {
    border-radius: 22px;
}

.card img {
    object-fit: cover;
    object-position: center;
}

.card-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.card-nav.prev {
    left: 10px;
}

.card-nav.next {
    right: 10px;
}

.card-nav img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.detail-panel {
    max-height: none;
    height: auto;
    overflow: visible;
    padding-right: 0;
}

.messages-pane {
    margin-top: 0;
    height: calc(100dvh - 188px);
    min-height: 420px;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}

.content-pane[data-pane="messages"] {
    margin-top: 0;
}

.chat-window {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.chat-body {
    min-height: 0;
}

@media (max-width: 1280px) {
    .content-pane.has-detail.active {
        grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
        gap: 16px;
    }

    .messages-pane {
        grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .top-nav {
        width: calc(100% - 16px);
    }

    .page {
        padding: 10px 14px 18px;
    }

    .content-pane.has-detail.active {
        grid-template-columns: 1fr;
        gap: 14px;
        min-height: auto;
    }

    .swipe-stage {
        max-width: 100%;
    }

    .cards-viewport {
        height: min(56dvh, 560px);
        min-height: 300px;
    }

    .detail-panel {
        max-height: none;
    }

    .messages-pane {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }

    .chat-list {
        max-height: 220px;
    }

    .chat-window {
        min-height: calc(100dvh - 360px);
    }
}

@media (max-width: 768px) {
    .auth-shell {
        padding: 18px;
        align-items: flex-start;
        padding-top: 64px;
    }

    .auth-row {
        grid-template-columns: 1fr;
    }

    .auth-theme-toggle {
        top: 14px;
        right: 14px;
    }

    .auth-hero {
        gap: 14px;
    }

    .auth-brand {
        font-size: 24px;
    }

    .auth-brand img {
        width: 52px;
        height: 52px;
    }

    .auth-hero__text {
        font-size: 15px;
    }

    .auth-page__card--wide {
        padding: 18px;
        border-radius: 22px;
    }

    .auth-panel__actions,
    .auth-inline--stack-mobile {
        grid-template-columns: 1fr;
    }

    .top-nav {
        top: 6px;
        border-radius: 16px;
        padding: 8px 10px 2px;
    }

    .top-nav__primary {
        gap: 8px;
    }

    .top-nav__right {
        gap: 6px;
    }

    .top-nav__cta,
    .assistant-btn,
    .top-nav__login {
        padding: 10px 12px;
        font-size: 13px;
    }

    .logo-text {
        font-size: 26px;
        padding-bottom: 10px;
    }

    .cards-viewport {
        height: min(54dvh, 500px);
        min-height: 260px;
    }

    .card-title {
        font-size: 17px;
    }

    .chat-window {
        min-height: calc(100dvh - 330px);
        padding: 12px;
    }

    .chat-input {
        grid-template-columns: 1fr 110px;
    }
}

@media (max-width: 560px) {
    .page {
        padding: 8px 10px 14px;
    }

    .top-nav__menu {
        padding-bottom: 2px;
    }

    .top-menu {
        gap: 12px;
    }

    .cards-viewport {
        height: min(50dvh, 430px);
        min-height: 220px;
    }

    .chat-list {
        max-height: 170px;
    }

    .chat-window {
        min-height: calc(100dvh - 300px);
    }

    .chat-input {
        grid-template-columns: 1fr;
    }

    .chat-input button {
        height: 46px;
    }
}

/* ===== Fixed Left Swipe + Full Height Chat + Aurora ===== */
:root {
    --sticky-top-offset: 118px;
    --page-gutter-bottom: 14px;
    --aurora-c1: rgba(255, 204, 0, 0.16);
    --aurora-c2: rgba(0, 170, 255, 0.14);
    --aurora-c3: rgba(0, 200, 120, 0.12);
}

.bg-waves {
    display: block;
    background: transparent;
}

.bg-waves::before,
.bg-waves::after {
    content: '';
    position: absolute;
    inset: -18% -10%;
    pointer-events: none;
    filter: blur(56px) saturate(1.2);
    transform-origin: center;
}

.bg-waves::before {
    background:
        radial-gradient(48% 38% at 14% 22%, var(--aurora-c1) 0%, rgba(255, 204, 0, 0) 72%),
        radial-gradient(56% 42% at 84% 16%, var(--aurora-c2) 0%, rgba(0, 170, 255, 0) 74%),
        radial-gradient(60% 44% at 36% 82%, var(--aurora-c3) 0%, rgba(0, 200, 120, 0) 74%);
    animation: auroraFlowA 18s ease-in-out infinite alternate;
}

.bg-waves::after {
    background:
        radial-gradient(44% 34% at 72% 70%, rgba(255, 204, 0, 0.1) 0%, rgba(255, 204, 0, 0) 72%),
        radial-gradient(52% 38% at 28% 66%, rgba(0, 170, 255, 0.1) 0%, rgba(0, 170, 255, 0) 75%),
        radial-gradient(46% 34% at 56% 30%, rgba(0, 200, 120, 0.08) 0%, rgba(0, 200, 120, 0) 74%);
    animation: auroraFlowB 22s ease-in-out infinite alternate;
}

@keyframes auroraFlowA {
    0% { transform: translate3d(-1.5%, -1%, 0) rotate(-2deg) scale(1); opacity: 0.72; }
    50% { transform: translate3d(1.8%, 1.2%, 0) rotate(1deg) scale(1.03); opacity: 0.86; }
    100% { transform: translate3d(-0.6%, 2.1%, 0) rotate(2deg) scale(1.05); opacity: 0.76; }
}

@keyframes auroraFlowB {
    0% { transform: translate3d(1.6%, 0.8%, 0) rotate(1deg) scale(1); opacity: 0.56; }
    50% { transform: translate3d(-1.4%, -1.2%, 0) rotate(-1deg) scale(1.04); opacity: 0.68; }
    100% { transform: translate3d(2.2%, -0.6%, 0) rotate(2deg) scale(1.06); opacity: 0.58; }
}

.content-pane.has-detail.active > .app-shell {
    position: sticky;
    top: var(--sticky-top-offset);
    align-self: start;
    height: calc(100dvh - var(--sticky-top-offset) - var(--page-gutter-bottom));
}

.content-pane.has-detail.active > .app-shell .swipe-stage {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 12px;
}

.content-pane.has-detail.active > .app-shell .cards-viewport {
    height: 100%;
    min-height: 0;
}


.content-pane.has-detail.active > .detail-panel {
    min-height: calc(100dvh - var(--sticky-top-offset) - var(--page-gutter-bottom));
    overflow-y: auto;
    padding-right: 6px;
}

.content-pane[data-pane="messages"].active {
    min-height: calc(100dvh - var(--sticky-top-offset) - var(--page-gutter-bottom));
}

.content-pane[data-pane="messages"] .messages-pane {
    height: calc(100dvh - var(--sticky-top-offset) - var(--page-gutter-bottom));
    min-height: 420px;
}

.content-pane[data-pane="messages"] .chat-window {
    min-height: 0;
    height: 100%;
}

.content-pane[data-pane="messages"] .chat-body {
    min-height: 0;
}

@media (max-width: 1024px) {
    :root {
        --sticky-top-offset: 92px;
    }

    .content-pane.has-detail.active > .app-shell {
        position: static;
        height: auto;
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage {
        height: auto;
        display: flex;
        gap: 16px;
    }

    .content-pane.has-detail.active > .app-shell .cards-viewport {
        height: min(56dvh, 560px);
    }

    .content-pane.has-detail.active > .detail-panel {
        min-height: auto;
        overflow: visible;
        padding-right: 0;
    }

    .content-pane[data-pane="messages"] .messages-pane {
        height: auto;
    }
}

@media (max-width: 768px) {
    :root {
        --sticky-top-offset: 78px;
    }

    .content-pane[data-pane="messages"] .chat-window {
        min-height: calc(100dvh - 340px);
    }
}

@media (max-width: 560px) {
    .bg-waves::before,
    .bg-waves::after {
        filter: blur(44px) saturate(1.1);
    }

    .content-pane[data-pane="messages"] .chat-window {
        min-height: calc(100dvh - 300px);
    }
}

/* ===== Dark Theme (Final Overrides) ===== */
[data-theme="dark"] {
    --text: #e8edf8;
    --muted: #9aa7bf;
    --border: rgba(187, 204, 232, 0.18);
    --panel: rgba(14, 20, 32, 0.76);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
    --accent: #5aa2ff;
    --like: #5aa2ff;
    --dislike: #94a3b8;
    --aurora-c1: rgba(255, 198, 0, 0.18);
    --aurora-c2: rgba(39, 153, 255, 0.18);
    --aurora-c3: rgba(0, 196, 128, 0.16);
}

[data-theme="dark"] body {
    color: var(--text);
    background: radial-gradient(circle at 10% 10%, rgba(43, 64, 104, 0.2), rgba(0, 0, 0, 0) 42%),
        radial-gradient(circle at 86% 16%, rgba(16, 49, 87, 0.25), rgba(0, 0, 0, 0) 48%),
        linear-gradient(180deg, #0c111c, #090d16 56%, #070b12 100%);
}

[data-theme="dark"] .top-nav {
    background: rgba(12, 17, 28, 0.78);
    border-color: rgba(167, 186, 218, 0.2);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .top-menu__item {
    color: #aebad0;
}

[data-theme="dark"] .top-menu__item.active,
[data-theme="dark"] .top-menu__item:hover {
    color: #e8efff;
}

[data-theme="dark"] .top-nav__logo,
[data-theme="dark"] .logo-text {
    color: #e8efff;
    text-shadow: none;
}

[data-theme="dark"] .logo-img {
    box-shadow: none;
}

[data-theme="dark"] .top-nav__login,
[data-theme="dark"] .assistant-btn,
[data-theme="dark"] .city-trigger,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .ghost-btn,
[data-theme="dark"] .profile-chip,
[data-theme="dark"] .like-chip,
[data-theme="dark"] .message-chip,
[data-theme="dark"] .favorites-side-item,
[data-theme="dark"] .favorites-group-item,
[data-theme="dark"] .chat-template-btn,
[data-theme="dark"] .auth-mode__btn {
    color: #d8e2f8;
    border-color: rgba(170, 188, 218, 0.24);
    background: rgba(17, 24, 38, 0.78);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

[data-theme="dark"] .top-nav__cta,
[data-theme="dark"] .primary-btn,
[data-theme="dark"] .chat-input button,
[data-theme="dark"] .auth-submit {
    background: linear-gradient(180deg, #4a97ff 0%, #2f7cff 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(46, 122, 255, 0.35);
}

[data-theme="dark"] .action-btn {
    background: rgba(18, 25, 40, 0.88);
    border-color: rgba(170, 188, 218, 0.18);
    box-shadow: 0px 7.881px 17.337px 0px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .action-btn:hover {
    background: rgba(26, 36, 58, 0.96);
}

[data-theme="dark"] .dislike svg {
    stroke: #94a3b8;
}

[data-theme="dark"] .like svg {
    stroke: #ff6b8a;
}


[data-theme="dark"] .mode-switch,
[data-theme="dark"] .swipe-stage,
[data-theme="dark"] .card,
[data-theme="dark"] .detail-card,
[data-theme="dark"] .profile-pane,
[data-theme="dark"] .favorites-pane,
[data-theme="dark"] .chat-list,
[data-theme="dark"] .chat-window,
[data-theme="dark"] .filter-modal__panel,
[data-theme="dark"] .create-modal__panel,
[data-theme="dark"] .auth-modal__panel,
[data-theme="dark"] .profile-menu,
[data-theme="dark"] .group-menu {
    background: rgba(14, 20, 32, 0.74);
    border-color: rgba(169, 188, 220, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mode-switch::before {
    background: linear-gradient(180deg, rgba(107, 154, 255, 0.3), rgba(82, 135, 247, 0.22));
    border-color: rgba(146, 177, 236, 0.35);
}

[data-theme="dark"] .mode-btn {
    color: #b6c4df;
}

[data-theme="dark"] .mode-btn.active {
    color: #ffffff;
}

[data-theme="dark"] .card-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(6, 9, 15, 0.86) 80%);
}

[data-theme="dark"] .feature,
[data-theme="dark"] .info-group li,
[data-theme="dark"] .chat-body,
[data-theme="dark"] .bubble,
[data-theme="dark"] .favorites-toolbar,
[data-theme="dark"] .favorites-main,
[data-theme="dark"] .favorites-sidebar,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .chat-item,
[data-theme="dark"] .price-input,
[data-theme="dark"] .map-placeholder {
    background: rgba(20, 29, 45, 0.72);
    border-color: rgba(166, 186, 220, 0.16);
    color: var(--text);
}

[data-theme="dark"] .bubble--user {
    background: rgba(56, 112, 219, 0.32);
    border-color: rgba(111, 160, 255, 0.42);
}

[data-theme="dark"] .chat-item.active {
    background: rgba(57, 103, 196, 0.32);
    border-color: rgba(118, 162, 246, 0.4);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    color: var(--text);
    background: rgba(16, 24, 39, 0.72);
    border-color: rgba(166, 186, 220, 0.2);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #8ea0c1;
}

[data-theme="dark"] .top-actions .icon,
[data-theme="dark"] .assistant-icon,
[data-theme="dark"] .filter-btn__icon,
[data-theme="dark"] .feature-icon,
[data-theme="dark"] .profile-avatar,
[data-theme="dark"] .favorites-group-thumb {
    color: #b5c4de;
}

[data-theme="dark"] .detail-transport__dot {
    background: #69a6ff;
}

[data-theme="dark"] .bg-waves::before {
    opacity: 0.86;
}

[data-theme="dark"] .bg-waves::after {
    opacity: 0.68;
}

/* ===== Unified Aurora Background (Yandex-Music style) ===== */
:root {
    --aurora-bg-0: #090b11;
    --aurora-bg-1: #0c111b;
    --aurora-center-yellow: rgba(255, 214, 10, 0.42);
    --aurora-center-pink: rgba(255, 52, 182, 0.32);
    --aurora-center-orange: rgba(255, 136, 31, 0.28);
    --aurora-beam-green: rgba(123, 255, 26, 0.34);
    --aurora-beam-blue: rgba(39, 160, 255, 0.28);
}

html,
body {
    background: linear-gradient(180deg, var(--aurora-bg-0) 0%, var(--aurora-bg-1) 100%) !important;
}

body {
    background-image: none !important;
}

.bg-wave-layer {
    display: none !important;
}

.bg-waves {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(120% 100% at 50% -15%, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(180deg, var(--aurora-bg-0), var(--aurora-bg-1));
}

.bg-waves::before,
.bg-waves::after {
    content: '';
    position: absolute;
    inset: -28%;
    pointer-events: none;
    transform-origin: 50% 50%;
}

.bg-waves::before {
    background:
        radial-gradient(34% 34% at 50% 42%, var(--aurora-center-yellow) 0%, rgba(255, 214, 10, 0) 72%),
        radial-gradient(32% 32% at 46% 48%, var(--aurora-center-pink) 0%, rgba(255, 52, 182, 0) 74%),
        radial-gradient(40% 40% at 56% 58%, var(--aurora-center-orange) 0%, rgba(255, 136, 31, 0) 76%);
    filter: blur(62px) saturate(1.35);
    opacity: 0.92;
    animation: auroraPulse 12s ease-in-out infinite alternate;
}

.bg-waves::after {
    background:
        conic-gradient(from 12deg at 52% 47%,
            rgba(255, 214, 10, 0) 0deg,
            var(--aurora-beam-green) 30deg,
            rgba(255, 214, 10, 0.2) 58deg,
            rgba(255, 214, 10, 0) 90deg,
            rgba(255, 90, 180, 0.22) 138deg,
            rgba(255, 90, 180, 0) 180deg,
            var(--aurora-beam-blue) 228deg,
            rgba(255, 214, 10, 0.18) 274deg,
            rgba(255, 214, 10, 0) 360deg),
        radial-gradient(50% 50% at 50% 50%, rgba(255, 221, 44, 0.2) 0%, rgba(255, 221, 44, 0) 76%);
    filter: blur(38px) saturate(1.25);
    opacity: 0.78;
    animation: auroraRays 18s linear infinite;
    mix-blend-mode: screen;
}

@keyframes auroraPulse {
    0% {
        transform: translate3d(-1.6%, -0.8%, 0) scale(0.98);
        opacity: 0.82;
    }
    50% {
        transform: translate3d(1.2%, 1%, 0) scale(1.04);
        opacity: 0.96;
    }
    100% {
        transform: translate3d(-0.4%, 1.8%, 0) scale(1.08);
        opacity: 0.88;
    }
}

@keyframes auroraRays {
    0% {
        transform: rotate(0deg) scale(1);
    }
    100% {
        transform: rotate(360deg) scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-waves::before,
    .bg-waves::after {
        animation: none !important;
    }
}

[data-theme="light"] .top-nav {
    background: rgba(251, 253, 255, 0.86);
    border-color: rgba(133, 157, 189, 0.24);
}

[data-theme="dark"] .top-nav {
    background: rgba(12, 17, 28, 0.78);
}

/* ===== Motion Polish (Global Animations) ===== */
:root {
    --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-snappy: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUpSoft {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInScaleSoft {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes paneReveal {
    0% {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.content-pane.pane-animating {
    animation: paneReveal 420ms var(--ease-out-soft);
}

.content-pane.pane-animating .chat-item,
.content-pane.pane-animating .fav-row,
.content-pane.pane-animating .profile-card,
.content-pane.pane-animating .card,
.content-pane.pane-animating .detail-card {
    animation: fadeInUpSoft 460ms var(--ease-out-soft);
}

.content-pane.pane-animating .chat-item:nth-child(2),
.content-pane.pane-animating .fav-row:nth-child(2),
.content-pane.pane-animating .profile-card:nth-child(2) {
    animation-delay: 40ms;
}

.content-pane.pane-animating .chat-item:nth-child(3),
.content-pane.pane-animating .fav-row:nth-child(3),
.content-pane.pane-animating .profile-card:nth-child(3) {
    animation-delay: 80ms;
}

.filter-modal,
.create-modal,
.auth-modal,
.image-modal {
    transition: opacity 260ms var(--ease-out-soft), visibility 260ms var(--ease-out-soft);
}

.filter-modal__panel,
.create-modal__panel,
.auth-modal__panel,
.image-modal__content {
    transform: translateY(14px) scale(0.97);
    opacity: 0;
    transition:
        transform 320ms var(--ease-out-snappy),
        opacity 240ms var(--ease-out-soft),
        box-shadow 320ms var(--ease-out-soft);
    will-change: transform, opacity;
}

.filter-modal.open .filter-modal__panel,
.create-modal.open .create-modal__panel,
.auth-modal.open .auth-modal__panel,
.image-modal.open .image-modal__content {
    transform: translateY(0) scale(1);
    opacity: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.profile-menu,
.group-menu {
    transform-origin: top right;
    animation: fadeInScaleSoft 240ms var(--ease-out-soft);
}

.messages-pane,
.favorites-layout,
.profile-section-view {
    animation: fadeInUpSoft 440ms var(--ease-out-soft);
}

.chat-item,
.fav-row,
.profile-card,
.favorites-group-item,
.top-menu__item,
.mode-btn,
.filter-btn,
.primary-btn,
.ghost-btn,
.action-btn,
.profile-chip,
.like-chip,
.message-chip,
.top-nav__cta,
.top-nav__login,
.assistant-btn {
    transition:
        transform 220ms var(--ease-out-snappy),
        background-color 220ms ease,
        border-color 220ms ease,
        box-shadow 260ms var(--ease-out-soft),
        color 220ms ease,
        opacity 220ms ease;
}

.bubble {
    animation: fadeInUpSoft 260ms var(--ease-out-soft);
}

.image-modal__thumb,
.chat-template-btn,
.favorites-side-item,
.profile-menu__item,
.group-menu__item {
    transition:
        transform 180ms var(--ease-out-snappy),
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 220ms var(--ease-out-soft);
}

@media (prefers-reduced-motion: reduce) {
    .content-pane.pane-animating,
    .content-pane.pane-animating .chat-item,
    .content-pane.pane-animating .fav-row,
    .content-pane.pane-animating .profile-card,
    .content-pane.pane-animating .card,
    .content-pane.pane-animating .detail-card,
    .filter-modal,
    .create-modal,
    .auth-modal,
    .image-modal,
    .filter-modal__panel,
    .create-modal__panel,
    .auth-modal__panel,
    .image-modal__content,
    .messages-pane,
    .favorites-layout,
    .profile-section-view,
    .bubble,
    .profile-menu,
    .group-menu {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ===== Smooth Theme Transition ===== */
html.theme-switching,
html.theme-switching body,
html.theme-switching .top-nav,
html.theme-switching .swipe-stage,
html.theme-switching .card,
html.theme-switching .detail-card,
html.theme-switching .profile-pane,
html.theme-switching .favorites-pane,
html.theme-switching .chat-window,
html.theme-switching .chat-list,
html.theme-switching .filter-modal__panel,
html.theme-switching .create-modal__panel,
html.theme-switching .auth-modal__panel,
html.theme-switching .profile-menu,
html.theme-switching .group-menu,
html.theme-switching .feature,
html.theme-switching .chat-item,
html.theme-switching .bubble,
html.theme-switching .top-nav__cta,
html.theme-switching .top-nav__login,
html.theme-switching .assistant-btn,
html.theme-switching .filter-btn,
html.theme-switching .primary-btn,
html.theme-switching .ghost-btn,
html.theme-switching .profile-chip,
html.theme-switching .like-chip,
html.theme-switching .message-chip,
html.theme-switching .favorites-group-item,
html.theme-switching .favorites-side-item,
html.theme-switching .chat-template-btn,
html.theme-switching .auth-mode__btn,
html.theme-switching .mode-switch,
html.theme-switching .mode-switch::before,
html.theme-switching .mode-btn,
html.theme-switching .top-menu__item,
html.theme-switching .logo-text,
html.theme-switching .bg-waves,
html.theme-switching .bg-waves::before,
html.theme-switching .bg-waves::after,
html.theme-switching input,
html.theme-switching textarea,
html.theme-switching select,
html.theme-switching svg,
html.theme-switching *::before,
html.theme-switching *::after {
    transition:
        background-color 420ms cubic-bezier(0.22, 1, 0.36, 1),
        color 360ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 380ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1),
        fill 360ms cubic-bezier(0.22, 1, 0.36, 1),
        stroke 360ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
    html.theme-switching,
    html.theme-switching body,
    html.theme-switching * {
        transition: none !important;
    }
}

/* ===== Theme Quality Pass (Final) ===== */
:root:not([data-theme="dark"]) {
    --text: #1f2a3a;
    --muted: #697a90;
    --border: rgba(112, 136, 170, 0.2);
    --panel: rgba(248, 251, 255, 0.86);
    --shadow: 0 16px 36px rgba(43, 71, 112, 0.13);
    --accent: #2f86ff;
    --like: #2f86ff;
    --dislike: #8a95a8;
}

:root:not([data-theme="dark"]) body {
    color: var(--text);
    background:
        radial-gradient(100.57% 160.91% at 15% 14%, rgba(255, 234, 184, 0.55) 0%, rgba(255, 234, 184, 0) 42%),
        radial-gradient(100.11% 160.18% at 86% 18%, rgba(205, 231, 255, 0.55) 0%, rgba(205, 231, 255, 0) 45%),
        radial-gradient(74.25% 118.79% at 56% 78%, rgba(210, 249, 234, 0.45) 0%, rgba(210, 249, 234, 0) 44%),
        linear-gradient(180deg, #F8FBFF 0%, #F5F7FB 100%) !important;
}

:root:not([data-theme="dark"]) .top-nav {
    background: rgba(251, 253, 255, 0.86);
    border-color: rgba(133, 157, 189, 0.24);
}

:root:not([data-theme="dark"]) .swipe-stage,
:root:not([data-theme="dark"]) .card,
:root:not([data-theme="dark"]) .detail-card,
:root:not([data-theme="dark"]) .profile-pane,
:root:not([data-theme="dark"]) .favorites-pane,
:root:not([data-theme="dark"]) .chat-window,
:root:not([data-theme="dark"]) .chat-list,
:root:not([data-theme="dark"]) .filter-modal__panel,
:root:not([data-theme="dark"]) .create-modal__panel,
:root:not([data-theme="dark"]) .auth-modal__panel {
    background: rgba(250, 253, 255, 0.86);
    border-color: rgba(120, 145, 178, 0.2);
}

[data-theme="dark"] {
    --text: #eef3ff;
    --muted: #adbbd3;
    --border: rgba(171, 193, 230, 0.22);
    --panel: rgba(14, 22, 35, 0.84);
    --shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    --accent: #63a8ff;
    --like: #63a8ff;
    --dislike: #9eacc4;
}

[data-theme="dark"] body {
    color: var(--text);
    background: radial-gradient(circle at 14% 14%, rgba(255, 199, 58, 0.12), rgba(0, 0, 0, 0) 36%),
        radial-gradient(circle at 86% 18%, rgba(50, 140, 255, 0.12), rgba(0, 0, 0, 0) 42%),
        linear-gradient(180deg, #0a101a 0%, #090f18 45%, #070c14 100%) !important;
}

[data-theme="dark"] .top-nav,
[data-theme="dark"] .swipe-stage,
[data-theme="dark"] .card,
[data-theme="dark"] .detail-card,
[data-theme="dark"] .profile-pane,
[data-theme="dark"] .favorites-pane,
[data-theme="dark"] .chat-window,
[data-theme="dark"] .chat-list,
[data-theme="dark"] .filter-modal__panel,
[data-theme="dark"] .create-modal__panel,
[data-theme="dark"] .auth-modal__panel,
[data-theme="dark"] .profile-menu,
[data-theme="dark"] .group-menu,
[data-theme="dark"] .favorites-main,
[data-theme="dark"] .favorites-sidebar {
    background: rgba(13, 21, 34, 0.82);
    border-color: rgba(170, 191, 225, 0.24);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .detail-title,
[data-theme="dark"] .detail-description,
[data-theme="dark"] .detail-description p,
[data-theme="dark"] .detail-location,
[data-theme="dark"] .detail-metro,
[data-theme="dark"] .detail-price-row .price,
[data-theme="dark"] .info-group h3,
[data-theme="dark"] .info-group li,
[data-theme="dark"] .owner-card__name,
[data-theme="dark"] .owner-card__stat-key,
[data-theme="dark"] .owner-card__desc-label,
[data-theme="dark"] .profile-title,
[data-theme="dark"] .profile-card-title,
[data-theme="dark"] .profile-card-value,
[data-theme="dark"] .chat-title,
[data-theme="dark"] .chat-item__title,
[data-theme="dark"] .favorites-title,
[data-theme="dark"] .favorites-side-item,
[data-theme="dark"] .favorites-toolbar__meta,
[data-theme="dark"] .feature-value,
[data-theme="dark"] .primary-btn,
[data-theme="dark"] .ghost-btn,
[data-theme="dark"] .top-menu__item,
[data-theme="dark"] .logo-text {
    color: #eef3ff !important;
}

[data-theme="dark"] .owner-card__stat-val,
[data-theme="dark"] .owner-card__desc-text {
    color: #697a90 !important;
}

[data-theme="dark"] .detail-price-note,
[data-theme="dark"] .detail-transport,
[data-theme="dark"] .feature-label,
[data-theme="dark"] .profile-sub,
[data-theme="dark"] .profile-card-note,
[data-theme="dark"] .chat-subtitle,
[data-theme="dark"] .chat-item__meta,
[data-theme="dark"] .favorites-empty,
[data-theme="dark"] .map-placeholder,
[data-theme="dark"] .price-note,
[data-theme="dark"] .bubble__meta,
[data-theme="dark"] .auth-label,
[data-theme="dark"] .seeker-rating-field__label,
[data-theme="dark"] .seeker-rating-status,
[data-theme="dark"] .seeker-rating-value {
    color: #adbbd3 !important;
}

[data-theme="dark"] .feature,
[data-theme="dark"] .info-group li,
[data-theme="dark"] .seeker-info-card,
[data-theme="dark"] .seeker-chip,
[data-theme="dark"] .owner-card,
[data-theme="dark"] .owner-card__photo-wrap,
[data-theme="dark"] .chat-body,
[data-theme="dark"] .bubble,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .chat-item,
[data-theme="dark"] .favorites-group-item,
[data-theme="dark"] .favorites-side-item,
[data-theme="dark"] .favorites-toolbar,
[data-theme="dark"] .price-input,
[data-theme="dark"] .map-block,
[data-theme="dark"] .map-placeholder {
    background: rgba(20, 31, 49, 0.78) !important;
    border-color: rgba(160, 183, 220, 0.22) !important;
}

[data-theme="dark"] .chat-item.active,
[data-theme="dark"] .favorites-tab.active,
[data-theme="dark"] .profile-list-tab.active,
[data-theme="dark"] .favorites-side-item.active {
    background: rgba(71, 129, 235, 0.3) !important;
    border-color: rgba(123, 165, 245, 0.46) !important;
    color: #f5f8ff !important;
}

[data-theme="dark"] .top-nav__login,
[data-theme="dark"] .assistant-btn,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .ghost-btn,
[data-theme="dark"] .profile-chip,
[data-theme="dark"] .like-chip,
[data-theme="dark"] .message-chip,
[data-theme="dark"] .chat-template-btn,
[data-theme="dark"] .auth-mode__btn {
    background: rgba(18, 29, 47, 0.84) !important;
    border-color: rgba(164, 187, 226, 0.3) !important;
    color: #dbe7fb !important;
}

[data-theme="dark"] .city-trigger__label {
    color: #94a3b8 !important;
}

[data-theme="dark"] .city-trigger__value {
    color: #eef3ff !important;
}

[data-theme="dark"] .city-menu .profile-menu__item.active {
    background: rgba(71, 129, 235, 0.24) !important;
    border-color: rgba(123, 165, 245, 0.34) !important;
    color: #f5f8ff !important;
}

[data-theme="dark"] .top-nav__cta,
[data-theme="dark"] .primary-btn,
[data-theme="dark"] .chat-input button,
[data-theme="dark"] .auth-submit {
    color: #ffffff !important;
    background: linear-gradient(180deg, #5ca3ff 0%, #357fff 100%) !important;
    box-shadow: 0 14px 28px rgba(57, 130, 255, 0.35) !important;
}

[data-theme="dark"] .auth-password-toggle {
    color: #93a7c8;
}

[data-theme="dark"] .auth-password-toggle:hover {
    background: rgba(92, 163, 255, 0.12);
    color: #eef3ff;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: rgba(14, 24, 39, 0.86) !important;
    border-color: rgba(164, 186, 223, 0.3) !important;
    color: #eef3ff !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #93a7c8 !important;
}

[data-theme="dark"] .auth-page__card--wide {
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.96), rgba(12, 18, 32, 0.94)) !important;
    border-color: rgba(164, 186, 223, 0.2) !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .auth-page__eyebrow {
    color: #5aa2ff;
}

[data-theme="dark"] .auth-page__sub {
    color: #9aadcc;
}

[data-theme="dark"] .auth-page__footer {
    color: #7a90b4;
}

[data-theme="dark"] .auth-page__footer a {
    color: #5aa2ff;
}

[data-theme="dark"] .auth-field select {
    background-color: rgba(14, 24, 39, 0.86) !important;
    border-color: rgba(164, 186, 223, 0.3) !important;
    color: #eef3ff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235aa2ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

[data-theme="dark"] .auth-theme-toggle {
    background: rgba(16, 24, 40, 0.88);
    border-color: rgba(164, 187, 226, 0.28);
    color: #7aa8e8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

[data-theme="dark"] .auth-theme-toggle:hover {
    background: rgba(22, 34, 58, 0.96);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .auth-submit--ghost {
    background: rgba(45, 128, 255, 0.14);
    color: #5aa2ff;
}

[data-theme="dark"] .bg-waves::before {
    opacity: 0.82;
    filter: blur(58px) saturate(1.18);
}

[data-theme="dark"] .bg-waves::after {
    opacity: 0.62;
    filter: blur(36px) saturate(1.12);
}

/* ===== Final Layout: Fixed Header + Fixed Swipe Column + Calm Background ===== */
:root {
    --header-fixed-height: 100px;
    --header-fixed-gap: 32px;
}

.page {
    padding-top: calc(var(--header-fixed-height) + var(--header-fixed-gap)) !important;
    min-height: 100dvh;
}

/* Убираем переливающийся фон полностью */
.bg-waves,
.bg-waves::before,
.bg-waves::after,
.bg-wave-layer {
    display: none !important;
    animation: none !important;
}

/* Спокойный монотонный фон */
html,
body {
    background: #f4f6fa !important;
}

body {
    background-image: linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%) !important;
}

/* В темной теме тоже без aurora, аккуратный нейтральный фон */
[data-theme="dark"] html,
[data-theme="dark"] body {
    background: #0d1420 !important;
}

[data-theme="dark"] body {
    background-image: linear-gradient(180deg, #0f1623 0%, #0b121d 100%) !important;
}

/* Левая колонка со свайпом фиксируется в зоне экрана */
.content-pane.has-detail.active {
    align-items: start;
}

.content-pane.has-detail.active > .app-shell {
    position: sticky !important;
    top: calc(var(--header-fixed-height) + var(--header-fixed-gap));
    height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 12px);
    align-self: start;
}

.content-pane.has-detail.active > .app-shell .swipe-stage {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 12px;
}

.content-pane.has-detail.active > .app-shell .cards-viewport {
    height: 100%;
    min-height: 0;
}

.content-pane.has-detail.active > .app-shell .actions {
    align-self: end;
    margin-top: 0;
}

/* Правая часть скроллится независимо */
.content-pane.has-detail.active > .detail-panel {
    max-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 12px);
    overflow-y: auto;
}

/* Чат тоже влезает под фикс-хедер */
.content-pane[data-pane="messages"].active {
    min-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap));
}

.content-pane[data-pane="messages"] .messages-pane {
    height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap));
}

/* Адаптив: на планшете/телефоне убираем фикс колонок */
@media (max-width: 1024px) {
    :root {
        --header-fixed-height: 116px;
    }

    .top-nav {
        width: calc(100% - 16px);
        top: 8px;
    }

    .page {
        padding-top: calc(var(--header-fixed-height) + 10px) !important;
    }

    .content-pane.has-detail.active > .app-shell {
        position: static !important;
        height: auto;
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .content-pane.has-detail.active > .detail-panel {
        max-height: none;
        overflow: visible;
    }

    .content-pane[data-pane="messages"] .messages-pane {
        height: auto;
    }
}

@media (max-width: 560px) {
    :root {
        --header-fixed-height: 104px;
    }

    .top-nav {
        top: 6px;
        width: calc(100% - 12px);
    }
}

/* ===== Final Fix: No White Gaps + Left Column Hard-Pinned ===== */
html,
body {
    margin: 0;
    min-height: 100%;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background: #0b121d !important;
}

html[data-theme="dark"] body {
    background-image: linear-gradient(180deg, #0f1623 0%, #0b121d 100%) !important;
}

html:not([data-theme="dark"]),
html:not([data-theme="dark"]) body {
    background: #f3f6fb !important;
}

html:not([data-theme="dark"]) body {
    background-image: linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%) !important;
}

@media (min-width: 1200px) {
    .content-pane.has-detail.active {
        display: block;
        position: relative;
        width: 100%;
        min-width: 0;
    }

    .content-pane.has-detail.active > .app-shell {
        position: fixed !important;
        left: 12px;
        top: calc(var(--header-fixed-height) + var(--header-fixed-gap));
        width: calc(50vw - 12px - 8px);
        max-width: none;
        height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 8px);
        z-index: 15;
        margin: 0;
        padding-left: 0;
        padding-right: 24px;
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage {
        height: 100%;
    }

    .content-pane.has-detail.active > .detail-panel {
        position: fixed;
        top: calc(var(--header-fixed-height) + var(--header-fixed-gap));
        left: calc(50vw + 8px);
        right: 12px;
        width: auto;
        max-width: none;
        min-width: 0;
        margin-left: 0;
        padding-left: 12px;
        padding-right: 0;
        box-sizing: border-box;
        max-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 8px);
        min-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 8px);
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 10;
    }

    .content-pane.has-detail.active > .detail-panel .detail-card {
        width: 100%;
        box-sizing: border-box;
    }

    /* Seeker mode */
    .content-pane.has-detail.active > .app-shell.mode-seeker {
        width: calc(36vw - 12px - 8px);
    }

    .content-pane.has-detail.active > .detail-panel.mode-seeker,
    .content-pane.has-detail.active:has(.swipe-stage.mode-seeker) > .detail-panel {
        left: 36vw;
        right: 12px;
    }
}

.info-group ul {
    gap: 10px;
}

.info-group li {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.28;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.info-group li span:first-child {
    color: var(--muted);
    font-weight: 650;
}

.info-group li span:last-child {
    color: var(--text);
    font-weight: 700;
    text-align: right;
    word-break: normal;
}

[data-theme="dark"] .info-group li {
    background: rgba(20, 31, 49, 0.82) !important;
    border-color: rgba(160, 183, 220, 0.24) !important;
}

@media (max-width: 820px) {
    .info-group li {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .info-group li span:last-child {
        text-align: left;
    }
}

@media (max-width: 1199px) {
    .content-pane.has-detail.active {
        display: grid;
    }

    .content-pane.has-detail.active > .app-shell {
        position: static !important;
        left: auto;
        width: 100%;
        height: auto;
        max-width: none;
    }

    .content-pane.has-detail.active > .detail-panel {
        margin-left: 0;
    }
}

/* ===== Final Polish: Fixed Right Panel + Clean Info Rows ===== */
@media (min-width: 1200px) {
    body {
        overflow-x: hidden;
    }
}

/* ===== Seeker Mode Layout Override (highest priority) ===== */
@media (min-width: 1200px) {
    body.mode-seeker .content-pane.has-detail.active > .app-shell {
        left: max(12px, calc((100vw - 1840px) / 2));
        width: calc(36vw - max(12px, calc((100vw - 1840px) / 2)) - 8px);
    }

    body.mode-seeker .content-pane.has-detail.active > .detail-panel {
        left: 36vw;
        right: max(12px, calc((100vw - 1840px) / 2));
        margin-left: 0;
    }
}

/* На экранах шире 1840px прижимаем колонки к краям контент-зоны */
@media (min-width: 1864px) {
    .content-pane.has-detail.active > .app-shell {
        left: calc((100vw - 1840px) / 2);
    }

    .content-pane.has-detail.active > .detail-panel {
        right: calc((100vw - 1840px) / 2) !important;
    }
}

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

.info-group li {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
    padding: 11px 13px;
}

.info-group li span:first-child {
    font-size: 14px;
    line-height: 1.3;
}

.info-group li span:last-child {
    font-size: 17px;
    line-height: 1.3;
    text-align: left;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Admin Panel ===== */
.admin-pane {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    padding: 22px;
    display: grid;
    gap: 18px;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-otp-toggle {
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
}

.admin-otp-toggle input {
    accent-color: #3b82f6;
}

.admin-otp-status {
    font-size: 13px;
    color: var(--muted);
    min-width: 98px;
}

.admin-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.admin-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.admin-refresh-btn {
    min-width: 128px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.admin-stat-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.admin-stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.admin-stat-value {
    font-size: 26px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--text);
}

.admin-stat-note {
    font-size: 12px;
    color: var(--muted);
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 14px;
    min-height: 520px;
}

.admin-users,
.admin-user-detail {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    padding: 14px;
    min-width: 0;
}

.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-card-head h3 {
    margin: 0;
    font-size: 18px;
}

#adminUsersSearch {
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    padding: 0 12px;
    outline: none;
    min-width: 170px;
}

#adminUsersSearch:focus {
    border-color: rgba(39, 123, 245, 0.55);
    box-shadow: 0 0 0 3px rgba(39, 123, 245, 0.16);
}

.admin-users-list {
    display: grid;
    gap: 8px;
    max-height: 470px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-user-row {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 12px;
    cursor: pointer;
    display: grid;
    gap: 4px;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.admin-user-row:hover {
    transform: translateY(-1px);
    border-color: rgba(39, 123, 245, 0.42);
}

.admin-user-row.active {
    border-color: rgba(39, 123, 245, 0.68);
    background: rgba(39, 123, 245, 0.12);
}

.admin-user-row__email {
    font-weight: 700;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.admin-user-row__meta {
    font-size: 12px;
    color: var(--muted);
}

.admin-user-empty {
    color: var(--muted);
    font-size: 14px;
    padding: 8px 2px;
}

.admin-user-content {
    display: grid;
    gap: 12px;
}

.admin-user-meta {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.62);
}

.admin-user-email {
    font-size: 16px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.admin-user-created {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.admin-user-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.admin-user-kpi {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    padding: 10px 12px;
    display: grid;
    gap: 5px;
}

.admin-user-kpi span {
    font-size: 12px;
    color: var(--muted);
}

.admin-user-kpi strong {
    font-size: 18px;
    line-height: 1;
}

.admin-user-block h4 {
    margin: 0 0 8px;
    font-size: 15px;
}

.admin-mini-list {
    display: grid;
    gap: 8px;
}

.admin-mini-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.58);
    padding: 9px 10px;
    display: grid;
    gap: 3px;
}

.admin-mini-row__title {
    font-size: 14px;
    font-weight: 650;
}

.admin-mini-row__meta {
    font-size: 12px;
    color: var(--muted);
}

.admin-logs {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    padding: 14px;
}

.admin-logs-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#adminLogsLevel {
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    padding: 0 10px;
    outline: none;
}

.admin-logs-list {
    display: grid;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.admin-log-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.66);
    padding: 9px 10px;
    display: grid;
    gap: 5px;
}

.admin-log-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-log-badge {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.admin-log-badge.level-error {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
}

.admin-log-badge.level-warn {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    border-color: rgba(180, 83, 9, 0.3);
}

.admin-log-badge.level-info {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.3);
}

.admin-log-at {
    color: var(--muted);
    font-size: 12px;
}

.admin-log-message {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
}

.admin-log-context {
    font-size: 12px;
    color: var(--muted);
    white-space: pre-wrap;
    word-break: break-word;
}

[data-theme="dark"] .admin-stat-card,
[data-theme="dark"] .admin-users,
[data-theme="dark"] .admin-user-detail,
[data-theme="dark"] .admin-user-meta,
[data-theme="dark"] .admin-user-kpi,
[data-theme="dark"] .admin-mini-row,
[data-theme="dark"] .admin-user-row,
[data-theme="dark"] #adminUsersSearch,
[data-theme="dark"] .admin-logs,
[data-theme="dark"] #adminLogsLevel,
[data-theme="dark"] .admin-log-row {
    background: rgba(16, 29, 50, 0.78) !important;
    border-color: rgba(148, 167, 202, 0.24) !important;
}

[data-theme="dark"] .admin-otp-toggle {
    background: rgba(16, 29, 50, 0.78) !important;
    border-color: rgba(148, 167, 202, 0.24) !important;
}

@media (max-width: 1120px) {
    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .admin-users-list {
        max-height: 320px;
    }
}

@media (max-width: 720px) {
    .admin-pane {
        padding: 14px;
        border-radius: 14px;
    }

    .admin-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-head-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-logs-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-user-kpis {
        grid-template-columns: 1fr;
    }
}

[data-theme="dark"] .auth-flow__btn {
    background: rgba(17, 30, 52, 0.74);
    border-color: rgba(148, 167, 202, 0.24);
    color: #b8c6dc;
}

[data-theme="dark"] .auth-flow__btn.active {
    background: rgba(32, 97, 212, 0.24);
    border-color: rgba(107, 157, 255, 0.5);
    color: #dbeafe;
}

/* ===== Final Dark Theme Readability ===== */
[data-theme="dark"] {
    --text: #e9f1ff;
    --muted: #b9c7df;
    --border: rgba(142, 171, 214, 0.32);
}

[data-theme="dark"] body {
    background: linear-gradient(180deg, #07152a 0%, #091b35 100%) !important;
}

[data-theme="dark"] .profile-pane,
[data-theme="dark"] .favorites-pane,
[data-theme="dark"] .chat-window,
[data-theme="dark"] .chat-list,
[data-theme="dark"] .detail-card,
[data-theme="dark"] .swipe-stage {
    background: rgba(14, 20, 32, 0.76) !important;
}

[data-theme="dark"] .top-nav {
    background: rgba(12, 17, 28, 0.78) !important;
}

[data-theme="dark"] .favorites-empty {
    border: 1px solid rgba(142, 171, 214, 0.28);
    border-radius: 14px;
    background: rgba(15, 28, 49, 0.9) !important;
    color: #dbe7fb !important;
}

[data-theme="dark"] .detail-description p,
[data-theme="dark"] .detail-location,
[data-theme="dark"] .detail-metro,
[data-theme="dark"] .detail-price-note,
[data-theme="dark"] .price-note,
[data-theme="dark"] .profile-card-note,
[data-theme="dark"] .chat-item__meta,
[data-theme="dark"] .bubble__meta {
    color: #c2d1ea !important;
}

[data-theme="dark"] .seeker-rating-status,
[data-theme="dark"] .seeker-rating-field__label {
    color: #d7e4fb !important;
}

[data-theme="dark"] .seeker-rating-comment {
    background: rgba(19, 32, 54, 0.92) !important;
    border-color: rgba(142, 171, 214, 0.3) !important;
    color: #ecf3ff !important;
}

[data-theme="dark"] .star-rating__star {
    background: rgba(24, 38, 62, 0.95);
    border-color: rgba(245, 158, 11, 0.42);
    color: #ffb74c;
}

[data-theme="dark"] .star-rating__star.active {
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(245, 158, 11, 0.7);
    color: #ffce73;
}

[data-theme="dark"] .primary-btn {
    box-shadow: 0 10px 30px rgba(47, 124, 246, 0.3);
}

[data-theme="dark"] .ghost-btn {
    background: rgba(16, 31, 53, 0.9) !important;
    border-color: rgba(142, 171, 214, 0.34) !important;
}

/* Favorites: explicit dark contrast for controls and disabled states */
[data-theme="dark"] .favorites-tab {
    color: #c8d6ee;
    border-color: rgba(142, 171, 214, 0.2);
}

[data-theme="dark"] .favorites-tab.active {
    color: #f4f8ff !important;
    background: rgba(77, 138, 247, 0.32) !important;
    border-color: rgba(123, 165, 245, 0.5) !important;
}

[data-theme="dark"] .favorites-sort,
[data-theme="dark"] .favorites-filter,
[data-theme="dark"] .favorites-delete,
[data-theme="dark"] .favorites-collection {
    background: rgba(16, 31, 53, 0.94) !important;
    border-color: rgba(142, 171, 214, 0.34) !important;
    color: #e9f1ff !important;
}

[data-theme="dark"] .favorites-delete:disabled,
[data-theme="dark"] .favorites-collection:disabled,
[data-theme="dark"] .favorites-filter:disabled {
    opacity: 1 !important;
    background: rgba(48, 62, 86, 0.65) !important;
    border-color: rgba(135, 159, 198, 0.3) !important;
    color: #9fb3d7 !important;
    cursor: not-allowed;
}

/* Profile lists: dark mode contrast for posted/liked/history rows */
[data-theme="dark"] .profile-fav-main {
    background: rgba(14, 27, 48, 0.9) !important;
    border-color: rgba(142, 171, 214, 0.3) !important;
}

[data-theme="dark"] .profile-list-tab {
    color: #bdd0ef;
    border-color: rgba(142, 171, 214, 0.2);
    background: rgba(13, 25, 43, 0.72);
}

[data-theme="dark"] .profile-list-tab.active {
    color: #f4f8ff !important;
    background: rgba(77, 138, 247, 0.32) !important;
    border-color: rgba(123, 165, 245, 0.5) !important;
}

[data-theme="dark"] .fav-row {
    border-bottom-color: rgba(142, 171, 214, 0.18);
}

[data-theme="dark"] .fav-row:hover {
    background: rgba(77, 138, 247, 0.14);
}

[data-theme="dark"] .fav-row__thumb {
    border-color: rgba(142, 171, 214, 0.28);
    background: rgba(16, 31, 53, 0.9);
}

[data-theme="dark"] .fav-row__status {
    color: #c9d8f3;
    background: rgba(71, 129, 235, 0.2);
    border-color: rgba(123, 165, 245, 0.42);
}

[data-theme="dark"] .fav-row__btn,
[data-theme="dark"] .fav-row__icon {
    background: rgba(16, 31, 53, 0.94);
    border-color: rgba(142, 171, 214, 0.34);
}

[data-theme="dark"] .fav-row__btn {
    color: #dbe7fb;
}

[data-theme="dark"] .fav-row__btn:hover,
[data-theme="dark"] .fav-row__icon:hover {
    background: rgba(27, 46, 75, 0.96);
}

[data-theme="dark"] .fav-row__btn--muted {
    color: #c5d6f3;
}

[data-theme="dark"] .fav-row__icon svg {
    stroke: #c5d6f3;
}

.admin-survey {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    padding: 14px;
    display: grid;
    gap: 12px;
}

.admin-survey-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.admin-survey-stat {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
    padding: 10px 12px;
}

.admin-survey-stat__label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.admin-survey-stat__value {
    margin-top: 4px;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text);
}

.admin-survey-breakdown {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-survey-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
    padding: 10px;
}

.admin-survey-block h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.admin-survey-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-survey-tag {
    border-radius: 999px;
    border: 1px solid rgba(39, 123, 245, 0.35);
    background: rgba(39, 123, 245, 0.1);
    color: var(--text);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 600;
}

.admin-survey-tag strong {
    margin-left: 4px;
}

.admin-survey-responses-wrap h4 {
    margin: 0;
    font-size: 14px;
}

.admin-survey-responses {
    display: grid;
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
}

.admin-survey-response {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    padding: 10px;
    display: grid;
    gap: 6px;
}

.admin-survey-response__meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-survey-response__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-survey-chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    padding: 3px 9px;
    font-size: 12px;
    color: var(--text);
}

.admin-survey-response__wish {
    font-size: 13px;
    color: var(--text);
    line-height: 1.45;
    white-space: pre-wrap;
}

[data-theme="dark"] .admin-survey,
[data-theme="dark"] .admin-survey-stat,
[data-theme="dark"] .admin-survey-block,
[data-theme="dark"] .admin-survey-response,
[data-theme="dark"] .admin-survey-chip {
    background: rgba(16, 29, 50, 0.78) !important;
    border-color: rgba(148, 167, 202, 0.24) !important;
}

[data-theme="dark"] .admin-survey-tag {
    background: rgba(53, 116, 232, 0.2);
    border-color: rgba(107, 157, 255, 0.42);
    color: #dbeafe;
}

@media (max-width: 1120px) {
    .admin-survey-stats {
        grid-template-columns: 1fr;
    }

    .admin-survey-breakdown {
        grid-template-columns: 1fr;
    }
}

.survey-prompt-modal {
    position: fixed;
    right: clamp(14px, 2vw, 24px);
    bottom: clamp(14px, 2vw, 24px);
    z-index: 260;
    pointer-events: none;
    width: min(92vw, 420px);
}

.survey-prompt-modal.open {
    pointer-events: auto;
}

.survey-prompt-modal__panel {
    position: relative;
    width: 100%;
    border: 1px solid rgba(140, 160, 190, 0.26);
    border-radius: 22px;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    box-shadow:
        0 26px 58px rgba(8, 19, 40, 0.26),
        0 10px 22px rgba(9, 24, 47, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.35) inset;
    transform: translate3d(0, 22px, 0) scale(0.98);
    opacity: 0;
    transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
    padding: 20px;
    pointer-events: auto;
}

.survey-prompt-modal.open .survey-prompt-modal__panel {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}

.survey-prompt-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.survey-prompt-modal__header h3 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.survey-prompt-modal__close {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.64);
    cursor: pointer;
    color: var(--text);
    transition: transform 0.16s ease, background 0.2s ease;
}

.survey-prompt-modal__close:hover {
    background: rgba(255, 255, 255, 0.86);
    transform: translateY(-1px);
}

.survey-prompt-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

.survey-prompt-modal__text {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.58;
    font-size: 21px;
    letter-spacing: -0.01em;
}

.survey-prompt-modal__actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.survey-prompt-modal__actions .ghost-btn,
.survey-prompt-modal__actions .primary-btn {
    min-height: 50px;
    border-radius: 16px;
    padding-inline: 22px;
    font-weight: 800;
    font-size: 17px;
    white-space: nowrap;
}

.survey-prompt-modal__actions .ghost-btn {
    border-color: rgba(138, 156, 184, 0.34);
    background: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .survey-prompt-modal__close {
    background: rgba(16, 29, 50, 0.78) !important;
    border-color: rgba(148, 167, 202, 0.24) !important;
}

@media (max-width: 720px) {
    .survey-prompt-modal {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
    }

    .survey-prompt-modal__panel {
        border-radius: 16px;
        padding: 14px;
    }

    .survey-prompt-modal__header h3 {
        font-size: 24px;
    }

    .survey-prompt-modal__text {
        font-size: 18px;
    }

    .survey-prompt-modal__actions {
        justify-content: stretch;
        flex-direction: column;
    }
}


.assistant-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.assistant-modal.open {
    pointer-events: auto;
    opacity: 1;
}

.assistant-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 42, 0.12);
    backdrop-filter: blur(4px);
}

.assistant-modal__panel {
    position: absolute;
    right: 24px;
    bottom: 24px;
    width: 360px;
    height: 560px;
    border: 1px solid #e8ecf2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    transform: scale(0.95) translateY(6px);
    transform-origin: bottom right;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
    opacity: 0;
}

.assistant-modal.open .assistant-modal__panel {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.assistant-modal__header {
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    position: relative;
    flex-shrink: 0;
}
.assistant-modal__title { font-size: 16px; font-weight: 600; line-height: 1.2; color: #111827; letter-spacing: -0.01em; }
.assistant-modal__subtitle { margin-top: 2px; color: #8b95a7; font-size: 12px; font-weight: 500; }
.assistant-modal__actions { display:inline-flex; gap:8px; flex-shrink: 0; }
.assistant-modal__new { display:none; }
.assistant-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #6b7280;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.assistant-modal__close:hover { background:#f3f4f6; color:#111827; border-color:#ececec; }
.assistant-modal__close:active { transform: scale(0.96); }
.assistant-modal__close svg { width:18px; height:18px; stroke:currentColor; stroke-width:2.2; fill:none; stroke-linecap:round; }
.assistant-chat {
    flex: 1;
    border:0;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    align-content:flex-start;
    gap:10px;
    padding:12px 14px 14px;
    min-height:0;
    background-color:#f5f5f5;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%2399a3b3' stroke-opacity='.085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 28c10 0 18 8 18 18'/%3E%3Cpath d='M40 48l8-8'/%3E%3Cpath d='M120 34c8 0 14 6 14 14'/%3E%3Cpath d='M132 50l6-6'/%3E%3Cpath d='M48 124c9 0 16 7 16 16'/%3E%3Cpath d='M60 140l7-7'/%3E%3Cpath d='M126 120c10 0 18 8 18 18'/%3E%3Cpath d='M138 140l8-8'/%3E%3Ccircle cx='92' cy='88' r='2.2'/%3E%3Ccircle cx='150' cy='78' r='1.8'/%3E%3Ccircle cx='74' cy='152' r='1.9'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 180px 180px;
    background-repeat: repeat;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
}
.assistant-chat::-webkit-scrollbar { width: 8px; }
.assistant-chat::-webkit-scrollbar-track { background: transparent; }
.assistant-chat::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.55); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
.assistant-chat::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.72); background-clip: content-box; }
.assistant-bubble {
    max-width:75%;
    border-radius:12px;
    border:0;
    background:#fff;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
    padding:8px 12px;
    animation: assistantBubbleIn .24s ease;
}
.assistant-bubble--user { margin-left:auto; background:#2563eb; color:#fff; border-bottom-right-radius:10px; }
.assistant-bubble__text { font-size:14px; font-weight:400; color:#111; line-height:1.45; white-space:pre-wrap; }
.assistant-bubble--user .assistant-bubble__text { color:#fff; }
.assistant-bubble__meta { margin-top:6px; font-size:11px; color:#94a3b8; text-align:right; }
.assistant-bubble--user .assistant-bubble__meta { color:rgba(255,255,255,.82); }
.assistant-chat__empty { color:#6b7280; font-size:13px; line-height:1.4; background:rgba(255,255,255,0.88); border:1px solid #eee; border-radius:12px; padding:10px 12px; max-width:75%; }
.assistant-quick-actions { display:flex; flex-wrap:wrap; gap:8px; padding:0 14px 10px; background:transparent; }
.assistant-quick-actions.hidden { display:none; }
.assistant-quick-actions__chip {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:32px;
    padding:6px 12px;
    border:none;
    background:#fff;
    color:#111827;
    border-radius:999px;
    box-shadow:none;
    text-align:left;
    transition:transform .16s ease, background-color .16s ease, border-color .16s ease;
    border:1px solid #eee;
}
.assistant-quick-actions__chip:hover { transform:translateY(-1px); background:#f9fafb; border-color:#e5e7eb; }
.assistant-quick-actions__title { display:block; font-size:13px; line-height:1.2; font-weight:600; }
.assistant-quick-actions__text { display:none; }
.assistant-quick-actions__pill {
    min-height:32px;
    border:none;
    border-radius:999px;
    background:#fff;
    color:#111827;
    font-size:13px;
    font-weight:600;
    box-shadow:none;
    padding:6px 12px;
    border:1px solid #eee;
}
.assistant-quick-actions__pill:hover { background:#f9fafb; border-color:#e5e7eb; }
.assistant-typing {
    margin:0 14px 10px;
    border:none;
    border-radius:999px;
    background:#fff;
    display:inline-flex;
    align-items:center;
    gap:8px;
    width:fit-content;
    padding:10px 12px;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
.assistant-typing span { width:8px; height:8px; border-radius:50%; background:#d8dde6; animation: assistantTyping 1.2s ease-in-out infinite; }
.assistant-typing em { display:none; }
.assistant-typing.hidden { display:none; }
.assistant-input { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:end; padding:10px 12px; background:#fff; border-top:1px solid #eee; flex-shrink:0; }
.assistant-input::before { content:none; }
.assistant-input textarea { min-height:40px; max-height:104px; border-radius:12px; border:1px solid #dbe2ea; background:#fff; padding:10px 12px; font-weight:500; font-size:14px; line-height:1.4; color:#172443; resize:none; box-shadow:none; overflow-y:auto; }
.assistant-input textarea::placeholder { color:#a0acc1; }
.assistant-input textarea:focus { outline:none; border-color:#3b82f6; box-shadow:0 0 0 4px rgba(59,130,246,0.12); }
.assistant-input button { border:none; width:auto; height:auto; box-shadow:none; position:relative; }
.assistant-input__menu { min-width:44px; min-height:40px; border-radius:12px; background:#f3f4f6; color:#111827; font-size:13px; font-weight:600; padding:0 12px; border:1px solid #e5e7eb; }
.assistant-input__menu:hover { background:#e5e7eb; }
.assistant-input #assistantSend { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:#2563eb; color:#fff; flex-shrink:0; transition:transform .16s ease, background-color .16s ease, box-shadow .16s ease; }
.assistant-input #assistantSend:hover { background:#1d4ed8; box-shadow:0 8px 20px rgba(37,99,235,0.24); transform:translateY(-1px) scale(1.02); }
.assistant-input #assistantSend:active { transform:scale(0.96); }
.assistant-input #assistantSend svg { width:18px; height:18px; stroke:currentColor; stroke-width:2.4; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.assistant-input #assistantSend:disabled { opacity:.65; cursor:not-allowed; }
[data-theme="dark"] .assistant-modal__panel { background:#132542; border-color:#365278; }
[data-theme="dark"] .assistant-modal__header { background:#1a304f; border-color:#2f4b74; }
[data-theme="dark"] .assistant-modal__title { color:#e7efff; }
[data-theme="dark"] .assistant-modal__subtitle { color:#a9bddf; }
[data-theme="dark"] .assistant-chat { border-color:#2f4b74; background-color:#1a3051; background-image: radial-gradient(circle at 15% 20%, rgba(128,167,239,.25) 0 2px, transparent 3px), radial-gradient(circle at 73% 43%, rgba(128,167,239,.25) 0 2px, transparent 3px), radial-gradient(circle at 38% 78%, rgba(128,167,239,.25) 0 2px, transparent 3px), linear-gradient(180deg, rgba(28,51,83,.92), rgba(24,45,74,.95)); }
[data-theme="dark"] .assistant-bubble { background:#213b62; }
[data-theme="dark"] .assistant-bubble__text { color:#e8f0ff; }
[data-theme="dark"] .assistant-bubble__meta { color:#b2c4e4; }
[data-theme="dark"] .assistant-quick-actions__pill,
[data-theme="dark"] .assistant-quick-actions__chip,
[data-theme="dark"] .assistant-typing {
    background: rgba(24, 43, 70, 0.96);
    border-color: rgba(119, 153, 204, 0.24);
    color: #e7efff;
}
[data-theme="dark"] .assistant-quick-actions__pill:hover,
[data-theme="dark"] .assistant-quick-actions__chip:hover {
    background: rgba(36, 62, 98, 0.98);
    border-color: rgba(144, 178, 227, 0.34);
}
[data-theme="dark"] .assistant-input {
    background: linear-gradient(180deg, rgba(19, 36, 60, 0.98), rgba(16, 30, 50, 0.98));
    border-top-color: rgba(119, 153, 204, 0.24);
}
[data-theme="dark"] .assistant-input textarea {
    background: rgba(17, 35, 58, 0.96);
    border-color: rgba(103, 137, 186, 0.42);
    color: #e8f0ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
[data-theme="dark"] .assistant-input textarea::placeholder { color: #9cb3d8; }
[data-theme="dark"] .assistant-input__menu {
    background: rgba(33, 58, 92, 0.98);
    color: #e7efff;
    border-color: rgba(119, 153, 204, 0.26);
}
[data-theme="dark"] .assistant-input__menu:hover { background: rgba(45, 74, 114, 0.98); }
[data-theme="dark"] .assistant-input #assistantSend { background: linear-gradient(180deg, #4a8cff, #2b6df2); }
[data-theme="dark"] .assistant-input #assistantSend:hover { background: linear-gradient(180deg, #5b97ff, #3576f4); }
@media (max-width: 820px) {
    .assistant-modal__panel { inset:auto 0 0 0; width:100%; height:min(88vh, 720px); border-radius:18px 18px 0 0; transform: scale(1) translateY(100%); transform-origin: bottom center; }
    .assistant-modal.open .assistant-modal__panel { transform: scale(1) translateY(0); }
    .assistant-modal__header { height:56px; padding:0 14px; }
    .assistant-modal__title { font-size:16px; }
    .assistant-modal__subtitle { font-size:12px; }
    .assistant-chat { padding:12px 12px 12px; gap:10px; }
    .assistant-bubble { max-width:80%; padding:8px 12px; }
    .assistant-bubble__text { font-size:14px; }
    .assistant-quick-actions { gap:8px; padding:0 12px 10px; }
    .assistant-quick-actions__pill,
    .assistant-quick-actions__chip { font-size:13px; }
    .assistant-input { gap:8px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); }
    .assistant-input__menu { min-width:44px; min-height:40px; font-size:13px; padding:0 12px; }
    .assistant-input textarea { min-height:40px; max-height:96px; padding:10px 12px; font-size:14px; }
    .assistant-input #assistantSend { width:40px; height:40px; }
}

@keyframes assistantBubbleIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes assistantTyping {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.top-nav__menu {
    display: none !important;
}

@media (max-width: 900px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
        background: var(--bg);
    }

    .company-tag {
        display: none;
    }

    .top-nav {
        position: sticky;
        top: 0;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        z-index: 180;
        margin: 0;
        padding: calc(env(safe-area-inset-top, 0px) + 6px) 16px 10px;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.92);
        border: 0;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(14px);
        overflow: visible;
    }

    .top-nav__primary {
        min-height: auto;
        gap: 8px;
        align-items: center;
        flex-wrap: nowrap;
    }

    .top-nav__left {
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .top-nav__logo {
        display: flex;
        min-height: 40px;
        padding: 0 10px;
        align-items: center;
        gap: 10px;
        border-radius: 14px;
        flex: 1;
        min-width: 0;
    }

    .city-dropdown {
        display: none;
    }

    .logo-text {
        font-size: clamp(32px, 8.4vw, 36px);
        padding-bottom: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .top-nav__right {
        display: none;
    }

    .assistant-btn,
    .top-nav__cta,
    .top-nav__login {
        min-height: 40px;
        padding: 0 12px;
        border-radius: 12px;
        white-space: nowrap;
        font-size: 13px;
    }

    .top-actions {
        gap: 8px;
    }

    .profile-dropdown {
        position: static;
    }

    .profile-menu {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 68px);
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 65vh;
        overflow: auto;
        z-index: 160;
        border-radius: 14px;
        box-shadow: 0 16px 36px rgba(17, 24, 39, 0.2);
    }

    .top-nav__mobile-menu-btn {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
        background: color-mix(in srgb, var(--panel) 90%, #fff 10%);
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        padding: 0 10px;
        cursor: pointer;
        box-shadow: 0 7px 18px rgba(15, 23, 42, 0.16);
        flex: 0 0 auto;
    }

    .top-nav__mobile-menu-btn span {
        display: block;
        height: 2.5px;
        width: 18px;
        border-radius: 99px;
        background: color-mix(in srgb, var(--text) 82%, #2b6be8 18%);
    }

    .page,
    .content-area,
    .content-pane,
    .content-pane.has-detail.active {
        min-height: auto;
        height: auto;
    }

    .page {
        padding: 15px 0 0 !important;
    }

    .content-pane.has-detail.active {
        display: block;
        padding: 0 0 20px;
        background: transparent;
    }

    .app-shell {
        padding: 0 8px 0;
    }

    .swipe-stage,
    .detail-panel,
    .detail-card {
        width: 100%;
        max-width: 100%;
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage {
        border-radius: 16px;
        border: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
        background: color-mix(in srgb, var(--panel) 92%, transparent);
        padding: 6px;
        min-height: calc(100dvh - 74px);
        height: calc(100dvh - 74px);
        position: relative;
        overflow: hidden;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
        animation: mobileCardEnter 320ms ease both;
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage::before,
    .content-pane.has-detail.active > .app-shell .swipe-stage::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        z-index: 7;
        pointer-events: none;
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage::before {
        top: 0;
        height: 88px;
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--bg) 72%, transparent) 0%,
            color-mix(in srgb, var(--bg) 34%, transparent) 46%,
            transparent 100%
        );
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage::after {
        bottom: 0;
        height: 126px;
        background: linear-gradient(
            0deg,
            color-mix(in srgb, var(--bg) 74%, transparent) 0%,
            color-mix(in srgb, var(--bg) 34%, transparent) 50%,
            transparent 100%
        );
        -webkit-backdrop-filter: blur(9px);
        backdrop-filter: blur(9px);
    }

    .content-pane.has-detail.active > .app-shell .swipe-toolbar {
        position: absolute;
        z-index: 9;
        top: 12px;
        left: 12px;
        right: 12px;
        margin: 0;
        padding: 8px;
        border-radius: 14px;
        background: color-mix(in srgb, var(--panel) 88%, transparent);
        border: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
        backdrop-filter: blur(6px);
    }

    .content-pane.has-detail.active > .app-shell .cards-viewport {
        height: 100%;
        min-height: 100%;
        border-radius: 12px;
    }

    .content-pane.has-detail.active > .app-shell .cards-stack,
    .content-pane.has-detail.active > .app-shell .card {
        height: 100%;
        min-height: 100%;
    }

    .content-pane.has-detail.active > .app-shell .card {
        border-radius: 12px;
    }

    .content-pane.has-detail.active > .app-shell .card img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    .content-pane.has-detail.active > .app-shell .actions {
        position: absolute;
        z-index: 9;
        left: 14px;
        right: 14px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
        margin: 0;
        background: color-mix(in srgb, var(--panel) 84%, transparent);
        border: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
        border-radius: 14px;
        padding: 8px 12px;
        backdrop-filter: blur(6px);
        animation: mobileControlsEnter 340ms ease both;
    }

    .detail-panel {
        margin-top: 8px;
        padding: 0 0 20px;
        overflow: visible;
        background: transparent;
        position: relative;
        z-index: 9;
        animation: mobileDetailsReveal 360ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .detail-card {
        padding: 16px 12px 18px;
        border-radius: 20px 20px 16px 16px;
        background: var(--panel);
        color: var(--text);
        border: 1px solid color-mix(in srgb, var(--border) 66%, transparent);
        box-shadow: 0 12px 30px rgba(17, 24, 39, 0.14);
    }

    .detail-price-row {
        align-items: flex-start;
    }

    .detail-buttons {
        position: static;
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 12px;
        background: transparent;
    }

    .detail-buttons .primary-btn,
    .detail-buttons .ghost-btn {
        min-height: 56px;
        height: 56px;
        border-radius: 14px;
        font-size: 16px;
        font-weight: 700;
    }

    .detail-features {
        display: none;
    }

    .auth-page {
        padding: 18px;
    }

    .auth-page__card,
    .auth-modal__panel {
        width: min(100%, 460px);
        padding: 22px 18px;
        border-radius: 28px;
    }

    .auth-inline {
        grid-template-columns: 1fr;
    }

    .empty-state {
        padding: 26px 16px;
        margin-top: 108px;
        font-size: 18px;
    }
}

@media (max-width: 900px) and (max-height: 740px) {
    .content-pane.has-detail.active > .app-shell .swipe-stage {
        min-height: calc(100dvh - 70px);
        height: calc(100dvh - 70px);
    }
}

@keyframes mobileDetailsReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mobileCardEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mobileControlsEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-nav__mobile-menu-btn {
    display: none;
}

.mobile-sidebar {
    position: fixed;
    inset: 0;
    z-index: 300;
    pointer-events: none;
}

.mobile-sidebar__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 13, 26, 0.35);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.mobile-sidebar__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(86vw, 360px);
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(132, 155, 191, 0.26);
    box-shadow: -18px 0 38px rgba(17, 24, 39, 0.2);
    transform: translateX(102%);
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    display: grid;
    grid-template-rows: auto 1fr;
}

[data-theme="dark"] .mobile-sidebar__panel {
    background: rgba(10, 20, 38, 0.98);
    border-left-color: rgba(142, 165, 201, 0.22);
}

.mobile-sidebar.open {
    pointer-events: auto;
}

.mobile-sidebar.open .mobile-sidebar__backdrop {
    opacity: 1;
}

.mobile-sidebar.open .mobile-sidebar__panel {
    transform: translateX(0);
}

.mobile-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 10px;
    border-bottom: 1px solid rgba(142, 165, 201, 0.22);
}

.mobile-sidebar__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.mobile-sidebar__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(139, 163, 199, 0.3);
    background: #fff;
    color: #274a86;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

[data-theme="dark"] .mobile-sidebar__close {
    background: rgba(16, 29, 50, 0.9);
    border-color: rgba(142, 165, 201, 0.28);
    color: #dbe7ff;
}

.mobile-sidebar__close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.3;
    fill: none;
}

.mobile-sidebar__list {
    padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
    overflow: auto;
    display: grid;
    gap: 8px;
}

.mobile-sidebar__item {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(138, 162, 198, 0.24);
    background: rgba(246, 250, 255, 0.92);
    color: #1f3358;
    font: inherit;
    font-weight: 700;
    text-align: left;
    padding: 0 12px;
}

.mobile-sidebar__item--accent {
    background: linear-gradient(135deg, #4f91ff, #2b6be8);
    color: #fff;
    border-color: transparent;
}

[data-theme="dark"] .mobile-sidebar__item {
    background: rgba(16, 29, 50, 0.82);
    border-color: rgba(142, 165, 201, 0.26);
    color: #dbe7ff;
}

.help-modal__panel {
    max-width: 520px;
}

.help-links {
    display: grid;
    gap: 12px;
}

.help-link-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(31, 59, 115, 0.12);
    background: rgba(247, 250, 255, 0.96);
    color: inherit;
    text-decoration: none;
}

.help-link-card__label {
    font-size: 13px;
    font-weight: 700;
    color: #5b6d88;
}

.help-link-card__value {
    font-size: 16px;
    font-weight: 800;
    color: #17315a;
}

[data-theme="dark"] .help-link-card {
    background: rgba(22, 38, 61, 0.98);
    border-color: rgba(112, 145, 194, 0.22);
}

[data-theme="dark"] .help-link-card__label { color: #9cb3d8; }
[data-theme="dark"] .help-link-card__value { color: #eef4ff; }
[data-theme="dark"] .filter-modal__title,
[data-theme="dark"] .filter-label,
[data-theme="dark"] .filter-checkbox,
[data-theme="dark"] .filter-checkbox span,
[data-theme="dark"] .pill-btn {
    color: #e8f0ff;
}
[data-theme="dark"] .pill-btn {
    background: rgba(21, 37, 60, 0.96);
    border-color: rgba(112, 145, 194, 0.24);
}
[data-theme="dark"] .pill-btn.active {
    background: linear-gradient(180deg, rgba(71, 131, 255, 0.24), rgba(46, 98, 220, 0.34));
    border-color: rgba(101, 154, 255, 0.5);
}
[data-theme="dark"] .filter-checkbox {
    background: rgba(21, 37, 60, 0.92);
    border-color: rgba(112, 145, 194, 0.22);
}
[data-theme="dark"] .filter-checkbox input {
    accent-color: #6aa3ff;
}
[data-theme="dark"] #priceMin,
[data-theme="dark"] #priceMax,
[data-theme="dark"] .filter-modal input,
[data-theme="dark"] .filter-modal select,
[data-theme="dark"] .filter-modal textarea {
    background: rgba(18, 33, 54, 0.96);
    color: #eef4ff;
    border-color: rgba(112, 145, 194, 0.28);
}

@media (max-width: 900px) {
    .top-nav__mobile-menu-btn {
        display: inline-flex;
    }
}

/* ============================================================
   МОБИЛЬНЫЙ ДИЗАЙН 
   ============================================================ */

@media (max-width: 900px) {
    .logo-img {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .logo-text {
        font-size: clamp(20px, 5.5vw, 26px);
        padding-bottom: 0;
    }
}

/* 2. seeker-info-cards: inline-grid с repeat(4, max-content) переполняет экран.
   На мобильных переключаем на двухколоночный адаптивный grid. */
@media (max-width: 900px) {
    .seeker-info-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }

    .seeker-info-card {
        min-width: 0;
        overflow: hidden;
    }

    .seeker-info-card__label,
    .seeker-info-card__value {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Однородный вид для 2-колоночных секций */
    .seeker-info-cards--2col {
        grid-template-columns: repeat(2, 1fr);
    }

    /* seeker-chips: убеждаемся что переносятся */
    .seeker-chips {
        flex-wrap: wrap;
    }

    .seeker-chip {
        width: auto;
        min-width: 0;
        flex: 1 1 calc(50% - 4px);
    }
}

/* 3. detail-features: показываем только в режиме объявлений,
   в режиме анкет seekerChips уже показывает те же данные */
@media (max-width: 900px) {
    body:not(.mode-seeker) .detail-features {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .feature {
        min-width: 0;
    }
}

/* 4. Кнопки «Показать телефон» / «Написать» — убираем обрезку текста */
@media (max-width: 900px) {
    .detail-buttons .primary-btn,
    .detail-buttons .ghost-btn {
        width: 100%;
        box-sizing: border-box;
        overflow: visible;
        white-space: normal;
        text-align: center;
        text-overflow: clip;
    }
}

/* 7. Убираем лишний padding у swipe-stage вне режима с деталями */
@media (max-width: 900px) {
    .swipe-stage {
        padding: 6px 8px 6px;
        border-radius: 16px;
        gap: 10px;
    }
}

/* 6. info-grid и map-block: показываем на мобильных (только для объявлений) */
@media (max-width: 900px) {
    body:not(.mode-seeker) .info-grid {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body:not(.mode-seeker) .map-block {
        display: grid !important;
        gap: 8px;
    }

    .map-frame {
        height: 220px;
    }
}
@media (max-width: 900px) {
    /* Убираем фиксированную высоту, разрешаем overflow */
    .content-pane.has-detail.active > .app-shell .swipe-stage {
        min-height: auto !important;
        height: auto !important;
        overflow: visible !important;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 6px 6px 0;
    }

    /* Убираем градиентные оверлеи (они для fullscreen-режима) */
    .content-pane.has-detail.active > .app-shell .swipe-stage::before,
    .content-pane.has-detail.active > .app-shell .swipe-stage::after {
        display: none !important;
    }

    /* Тулбар — обычный поток, не абсолютный */
    .content-pane.has-detail.active > .app-shell .swipe-toolbar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 0 6px;
        flex-shrink: 0;
    }

    /* Квадратная область просмотра карточки — только для объявлений */
    body:not(.mode-seeker) .content-pane.has-detail.active > .app-shell .cards-viewport {
        aspect-ratio: 1 / 1;
    }

    /* В режиме анкет — портретная пропорция */
    body.mode-seeker .content-pane.has-detail.active > .app-shell .cards-viewport {
        aspect-ratio: 3 / 4;
    }

    .content-pane.has-detail.active > .app-shell .cards-viewport {
        height: auto !important;
        min-height: auto !important;
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .content-pane.has-detail.active > .app-shell .cards-stack {
        height: 100%;
        min-height: auto !important;
    }

    .content-pane.has-detail.active > .app-shell .card {
        height: 100%;
        min-height: auto !important;
        border-radius: 12px;
    }

    /* Показываем полосу миниатюр */
    .content-pane.has-detail.active > .app-shell .card-thumbs {
        display: flex !important;
        flex-shrink: 0;
        padding: 8px 2px 4px;
    }

    /* Кнопки лайк/дизлайк — возвращаем в поток */
    .content-pane.has-detail.active > .app-shell .actions {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 6px 0 6px;
        flex-shrink: 0;
    }

    /* Уменьшаем размер кнопок лайк/дизлайк на мобильном */
    .content-pane.has-detail.active > .app-shell .action-btn {
        height: 56px;
        border-radius: 18px;
        flex: 1;
        width: auto;
        min-width: 0;
        max-width: none;
    }

    .content-pane.has-detail.active > .app-shell .action-btn svg {
        width: 22px;
        height: 22px;
    }

    .content-pane.has-detail.active > .app-shell .like img {
        width: 44px;
        height: 44px;
    }

    /* Уменьшаем размер миниатюр для мобильных */
    .card-thumb {
        width: 72px;
        height: 52px;
        border-radius: 10px;
    }
}

/* Settings Page */
.settings-pane {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.settings-subtitle {
    font-size: 14px;
    color: var(--muted);
}

.settings-container {
    display: grid;
    gap: 32px;
}

.settings-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    background: var(--panel);
}

.settings-section--danger {
    border-color: #fca5a5;
    background: rgba(220, 38, 38, 0.05);
}

.settings-section__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.settings-form {
    display: grid;
    gap: 16px;
}

.settings-field {
    display: grid;
    gap: 6px;
}

.settings-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: block;
}

.settings-field input,
.settings-field textarea,
.settings-field select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
}

.settings-field input:focus,
.settings-field textarea:focus,
.settings-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 59, 115, 0.1);
}

.settings-field input:disabled {
    background: var(--border);
    cursor: not-allowed;
    opacity: 0.6;
}

.settings-field textarea {
    resize: vertical;
    min-height: 100px;
}

.settings-hint {
    font-size: 12px;
    color: var(--muted);
    display: block;
}

.settings-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.settings-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.settings-checkbox span {
    font-size: 14px;
    color: var(--text);
}

.settings-subsection {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.sessions-list {
    display: grid;
    gap: 12px;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.session-device {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.session-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.session-action {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.session-action:hover:not(:disabled) {
    background: var(--border);
}

.session-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.settings-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.settings-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.settings-message.error {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.settings-message.hidden {
    display: none;
}

.settings-danger-btn {
    color: #dc2626;
    border-color: #fca5a5;
}

.settings-danger-btn:hover {
    background: rgba(220, 38, 38, 0.05);
}

.ghost-btn--danger {
    color: #dc2626;
    border-color: #fca5a5;
}

.ghost-btn--danger:hover {
    background: rgba(220, 38, 38, 0.05);
}

.primary-btn--danger {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.primary-btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Notification styles */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.notification--success {
    background: #22c55e;
    color: white;
    border: 1px solid #16a34a;
}

.notification--error {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .settings-pane {
        padding: 16px;
    }

    .settings-header h1 {
        font-size: 24px;
    }

    .settings-section {
        padding: 16px;
    }

    .settings-actions {
        flex-direction: column-reverse;
    }

    .settings-actions button {
        width: 100%;
    }
}

/* Settings Page */
.settings-pane {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.settings-header {
    margin-bottom: 32px;
}

.settings-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.settings-subtitle {
    font-size: 14px;
    color: var(--muted);
}

.settings-container {
    display: grid;
    gap: 32px;
}

.settings-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    background: var(--panel);
}

.settings-section--danger {
    border-color: #fca5a5;
    background: rgba(220, 38, 38, 0.05);
}

.settings-section__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.settings-form {
    display: grid;
    gap: 16px;
}

.settings-field {
    display: grid;
    gap: 6px;
}

.settings-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-field input,
.settings-field textarea,
.settings-field select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
}

.settings-field input:focus,
.settings-field textarea:focus,
.settings-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 59, 115, 0.1);
}

.settings-field input:disabled {
    background: var(--border);
    cursor: not-allowed;
    opacity: 0.6;
}

.settings-field textarea {
    resize: vertical;
    min-height: 100px;
}

.settings-hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.settings-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.settings-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.settings-checkbox span {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.settings-subsection {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.sessions-list {
    display: grid;
    gap: 12px;
}

.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.session-info {
    display: grid;
    gap: 4px;
}

.session-device {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.session-meta {
    font-size: 12px;
    color: var(--muted);
}

.session-action {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.session-action:hover:not(:disabled) {
    background: var(--border);
}

.session-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.settings-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    animation: slideIn 0.3s ease-out;
}

.settings-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.settings-message.error {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.settings-message.hidden {
    display: none;
}

.settings-danger-btn {
    color: #dc2626;
    border-color: #fca5a5;
}

.settings-danger-btn:hover {
    background: rgba(220, 38, 38, 0.05);
}

.ghost-btn--danger {
    color: #dc2626;
    border-color: #fca5a5;
}

.ghost-btn--danger:hover {
    background: rgba(220, 38, 38, 0.05);
}

.primary-btn--danger {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.primary-btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Notification styles */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.notification--success {
    background: #22c55e;
    color: white;
    border: 1px solid #16a34a;
}

.notification--error {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .settings-pane {
        padding: 16px;
    }

    .settings-header h1 {
        font-size: 24px;
    }

    .settings-section {
        padding: 16px;
    }

    .settings-actions {
        flex-direction: column-reverse;
    }

    .settings-actions button {
        width: 100%;
    }

    .notification {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
}

/* ===== Account UI Refresh: profile, favorites, chat, settings ===== */
:root {
    --ui-bg: #f4f7fb;
    --ui-panel: rgba(255, 255, 255, 0.92);
    --ui-panel-solid: #ffffff;
    --ui-panel-muted: #f7f9fc;
    --ui-card: #ffffff;
    --ui-card-hover: #f8fbff;
    --ui-line: rgba(129, 145, 171, 0.24);
    --ui-line-strong: rgba(95, 116, 150, 0.34);
    --ui-text: #172033;
    --ui-muted: #64748b;
    --ui-soft: #eef4ff;
    --ui-accent: #2563eb;
    --ui-accent-strong: #1d4ed8;
    --ui-accent-soft: rgba(37, 99, 235, 0.11);
    --ui-danger: #dc2626;
    --ui-radius: 14px;
    --ui-radius-lg: 18px;
    --ui-shadow: 0 18px 44px rgba(30, 41, 59, 0.10);
    --ui-shadow-soft: 0 10px 24px rgba(30, 41, 59, 0.08);

    --bg: var(--ui-bg);
    --panel: var(--ui-panel-solid);
    --text: var(--ui-text);
    --muted: var(--ui-muted);
    --border: var(--ui-line);
    --accent: var(--ui-accent);
}

[data-theme="dark"] {
    --ui-bg: #0b111b;
    --ui-panel: rgba(17, 24, 38, 0.94);
    --ui-panel-solid: #111827;
    --ui-panel-muted: #151f31;
    --ui-card: #131c2b;
    --ui-card-hover: #172235;
    --ui-line: rgba(148, 163, 184, 0.18);
    --ui-line-strong: rgba(148, 163, 184, 0.30);
    --ui-text: #eef4ff;
    --ui-muted: #a8b4c7;
    --ui-soft: rgba(96, 165, 250, 0.13);
    --ui-accent: #60a5fa;
    --ui-accent-strong: #93c5fd;
    --ui-accent-soft: rgba(96, 165, 250, 0.16);
    --ui-danger: #f87171;
    --ui-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
    --ui-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.30);

    --bg: var(--ui-bg);
    --panel: var(--ui-panel-solid);
    --text: var(--ui-text);
    --muted: var(--ui-muted);
    --border: var(--ui-line);
    --accent: var(--ui-accent);
    color-scheme: dark;
}

html:not([data-theme="dark"]),
html:not([data-theme="dark"]) body {
    background: var(--ui-bg) !important;
}

html:not([data-theme="dark"]) body {
    background-image:
        linear-gradient(180deg, #f8fafc 0%, var(--ui-bg) 100%) !important;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
[data-theme="dark"] body {
    background: var(--ui-bg) !important;
    background-image:
        radial-gradient(circle at 24% 0%, rgba(37, 99, 235, 0.10), transparent 34%),
        linear-gradient(180deg, #0d1420 0%, var(--ui-bg) 100%) !important;
}

.profile-pane,
.favorites-pane,
.messages-pane .chat-list,
.messages-pane .chat-window,
.settings-section {
    background: var(--ui-panel) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius-lg) !important;
    box-shadow: var(--ui-shadow-soft);
}

.profile-pane,
.favorites-pane {
    padding: 22px;
    gap: 18px;
}

.profile-header {
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: linear-gradient(180deg, var(--ui-card), var(--ui-panel-muted));
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border: 1px solid var(--ui-line);
    background: var(--ui-soft);
    color: var(--ui-accent);
}

.profile-title {
    color: var(--ui-text);
    font-size: 20px;
    line-height: 1.15;
}

.profile-sub {
    color: var(--ui-muted);
}

.profile-login {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 14px;
    border: 1px dashed var(--ui-line-strong);
    border-radius: var(--ui-radius);
    background: var(--ui-panel-muted);
}

.profile-login input,
.settings-field input,
.settings-field textarea,
.settings-field select,
.chat-input input,
.favorites-sort {
    background: var(--ui-card) !important;
    border: 1px solid var(--ui-line-strong) !important;
    color: var(--ui-text) !important;
    box-shadow: none;
}

.profile-login button,
.chat-input button {
    min-height: 42px;
    border: 0;
    background: linear-gradient(180deg, var(--ui-accent), var(--ui-accent-strong)) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.profile-logout {
    border-color: var(--ui-line);
    background: var(--ui-card);
    color: var(--ui-text);
}

.profile-cards {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.profile-card {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background: var(--ui-card);
    padding: 16px;
    min-height: 132px;
}

.profile-card[data-section]:hover,
.profile-card--active {
    transform: translateY(-1px);
    background: var(--ui-card-hover);
    border-color: color-mix(in srgb, var(--ui-accent) 44%, var(--ui-line));
    box-shadow: var(--ui-shadow-soft);
}

.profile-card-title,
.profile-card-value {
    color: var(--ui-text) !important;
}

.profile-card-value {
    margin-top: 8px;
    font-size: 30px;
    line-height: 1;
}

.profile-card-note {
    margin-top: 8px;
    color: var(--ui-muted) !important;
    line-height: 1.35;
}

.profile-section-view,
.profile-fav-main,
.posted-list {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-panel) !important;
}

.profile-section-view {
    padding: 14px;
}

.legal-hub {
    display: grid;
    gap: 18px;
}

.legal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--ui-line);
    border-radius: calc(var(--ui-radius-lg) + 4px);
    background:
        radial-gradient(circle at top left, rgba(46, 109, 214, 0.16), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.94));
}

.legal-hero__eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ui-accent);
    margin-bottom: 8px;
}

.legal-hero h2,
.legal-support h3,
.legal-card h3 {
    color: var(--ui-text);
}

.legal-hero h2 {
    font-size: 30px;
    line-height: 1.05;
    margin-bottom: 10px;
}

.legal-hero p,
.legal-card p,
.legal-support p,
.legal-note {
    color: var(--ui-muted);
}

.legal-hero__badge,
.legal-note,
.legal-support,
.legal-card {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-panel-muted);
}

.legal-hero__badge {
    display: grid;
    align-content: end;
    gap: 10px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.1), rgba(255, 255, 255, 0.9));
}

.legal-hero__badge strong {
    color: var(--ui-text);
    font-size: 18px;
}

.legal-hero__badge span {
    color: var(--ui-muted);
    line-height: 1.45;
}

.legal-anchor-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-anchor {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--ui-line);
    background: var(--ui-panel-muted);
    color: var(--ui-text);
    text-decoration: none;
    font-weight: 700;
}

.legal-anchor:hover {
    border-color: color-mix(in srgb, var(--ui-accent) 38%, var(--ui-line));
    background: var(--ui-accent-soft);
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.legal-card {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.legal-card__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(29, 78, 216, 0.14), rgba(29, 78, 216, 0.04));
    color: var(--ui-accent);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.legal-list {
    display: grid;
    gap: 8px;
    padding-left: 18px;
    color: var(--ui-text);
}

.legal-list li::marker {
    color: var(--ui-accent);
}

.legal-note {
    padding: 16px 18px;
    line-height: 1.6;
}

.legal-note strong {
    color: var(--ui-text);
}

.legal-support {
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.9fr);
    gap: 16px;
}

.legal-support__links {
    display: grid;
    gap: 12px;
    align-content: start;
}

.legal-support__empty {
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed var(--ui-line);
    color: var(--ui-muted);
    background: rgba(255, 255, 255, 0.55);
}

.legal-support-link {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--ui-line);
    background: var(--ui-card);
    text-decoration: none;
}

.legal-support-link:hover {
    border-color: color-mix(in srgb, var(--ui-accent) 36%, var(--ui-line));
    transform: translateY(-1px);
    box-shadow: var(--ui-shadow-soft);
}

.legal-support-link__label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-accent);
}

.legal-support-link__value {
    color: var(--ui-text);
    font-weight: 700;
    word-break: break-word;
}

[data-theme="dark"] .legal-hero {
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(18, 26, 44, 0.96), rgba(15, 23, 42, 0.92));
}

[data-theme="dark"] .legal-hero__badge,
[data-theme="dark"] .legal-note,
[data-theme="dark"] .legal-support,
[data-theme="dark"] .legal-card,
[data-theme="dark"] .legal-anchor,
[data-theme="dark"] .legal-support-link {
    background: var(--ui-panel);
}

[data-theme="dark"] .legal-support__empty {
    background: rgba(15, 23, 42, 0.58);
}

@media (max-width: 980px) {
    .legal-grid,
    .legal-hero,
    .legal-support {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .legal-hero,
    .legal-card,
    .legal-support,
    .legal-note {
        padding: 16px;
    }

    .legal-hero h2 {
        font-size: 24px;
    }

    .legal-anchor {
        width: 100%;
        text-align: center;
    }

    .legal-support-link {
        border-radius: 14px;
    }
}

.favorites-header {
    justify-content: space-between;
    padding-bottom: 4px;
}

.favorites-title {
    color: var(--ui-text) !important;
    font-size: 24px;
    letter-spacing: 0;
}

.favorites-tabs {
    padding: 4px;
    border-color: var(--ui-line);
    background: var(--ui-panel-muted);
}

.favorites-tab,
.profile-list-tab {
    color: var(--ui-muted);
    border-radius: 10px;
    font-weight: 800;
}

.favorites-tab.active,
.profile-list-tab.active {
    background: var(--ui-card) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-accent) !important;
    box-shadow: 0 5px 14px rgba(30, 41, 59, 0.08);
}

.favorites-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 16px;
}

.favorites-sidebar,
.favorites-main {
    background: var(--ui-panel-muted) !important;
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius-lg);
}

.favorites-side-item,
.favorites-group-item {
    color: var(--ui-text) !important;
    border-radius: 12px;
}

.favorites-side-item:hover,
.favorites-side-item.active,
.favorites-group-item:hover,
.favorites-group-item.active {
    background: var(--ui-accent-soft) !important;
    border-color: color-mix(in srgb, var(--ui-accent) 35%, var(--ui-line)) !important;
}

.favorites-side-item__count,
.favorites-group-create,
.favorites-filter-chip.active {
    background: var(--ui-accent-soft) !important;
    border-color: color-mix(in srgb, var(--ui-accent) 32%, var(--ui-line)) !important;
    color: var(--ui-accent) !important;
}

.favorites-groups {
    border-top-color: var(--ui-line);
}

.favorites-groups__title,
.favorites-group-name,
.favorites-toolbar__meta {
    color: var(--ui-text) !important;
}

.favorites-group-thumb,
.favorites-group-create__icon {
    background: var(--ui-card);
    border-color: var(--ui-line);
    color: var(--ui-muted);
}

.favorites-toolbar,
.favorites-filters {
    background: var(--ui-card);
    border-bottom-color: var(--ui-line);
}

.favorites-filter,
.favorites-delete,
.favorites-collection,
.chat-template-btn,
.session-action {
    background: var(--ui-card) !important;
    border: 1px solid var(--ui-line-strong) !important;
    color: var(--ui-text) !important;
}

.favorites-filter:hover,
.favorites-collection:not(:disabled):hover,
.chat-template-btn:hover,
.session-action:hover:not(:disabled) {
    background: var(--ui-card-hover) !important;
    border-color: color-mix(in srgb, var(--ui-accent) 35%, var(--ui-line)) !important;
}

.favorites-list,
.chat-body,
.chat-list {
    scrollbar-color: color-mix(in srgb, var(--ui-muted) 42%, transparent) transparent;
}

.favorites-empty,
.chat-empty,
.chat-list__empty {
    margin: 10px;
    padding: 22px;
    border: 1px dashed var(--ui-line-strong);
    border-radius: var(--ui-radius);
    background: var(--ui-panel-muted) !important;
    color: var(--ui-muted) !important;
    text-align: center;
}

.favorites-empty,
.chat-empty {
    justify-self: stretch;
}

.chat-body .chat-empty {
    align-self: start;
}

.fav-row {
    border-bottom-color: var(--ui-line);
    background: var(--ui-card);
}

.fav-row:hover {
    background: var(--ui-card-hover);
}

.messages-pane {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 14px;
}

.chat-list,
.chat-window {
    padding: 12px;
}

.chat-item {
    position: relative;
    background: var(--ui-card) !important;
    border-color: var(--ui-line) !important;
    border-radius: var(--ui-radius);
    box-shadow: none;
}

.chat-item:hover {
    background: var(--ui-card-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--ui-shadow-soft);
}

.chat-item.active {
    background: var(--ui-accent-soft) !important;
    border-color: color-mix(in srgb, var(--ui-accent) 44%, var(--ui-line)) !important;
    box-shadow: none;
}

.chat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 999px;
    background: var(--ui-accent);
}

.chat-item__thumb {
    border-color: var(--ui-line);
    background: var(--ui-panel-muted);
}

.chat-item__title,
.chat-title {
    color: var(--ui-text) !important;
}

.chat-item__meta,
.chat-subtitle,
.bubble__meta {
    color: var(--ui-muted) !important;
}

.chat-header {
    padding: 12px;
    border: 1px solid var(--ui-line);
    background: var(--ui-card);
}

.chat-header:hover {
    background: var(--ui-card-hover);
}

.chat-pill {
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
}

.chat-body {
    border-color: var(--ui-line);
    background: var(--ui-panel-muted) !important;
    border-radius: var(--ui-radius);
}

.bubble {
    background: var(--ui-card) !important;
    border-color: var(--ui-line) !important;
    color: var(--ui-text);
    border-radius: 16px 16px 16px 6px;
    box-shadow: 0 6px 18px rgba(30, 41, 59, 0.07);
}

.bubble--user {
    background: linear-gradient(180deg, var(--ui-accent), var(--ui-accent-strong)) !important;
    border-color: transparent !important;
    color: #fff;
    border-radius: 16px 16px 6px 16px;
}

.bubble--user .bubble__meta {
    color: rgba(255, 255, 255, 0.78) !important;
}

.chat-input {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    background: var(--ui-card);
}

.chat-input input {
    border-color: transparent !important;
    background: transparent !important;
    height: 42px;
}

.chat-input input:focus {
    outline: none;
}

.chat-input button {
    min-width: 108px;
    border-radius: 11px;
}

.settings-pane {
    max-width: 1100px;
    padding: 28px 18px 40px;
}

.settings-header {
    margin-bottom: 22px;
    padding: 14px 18px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-panel);
    box-shadow: var(--ui-shadow-soft);
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-header h1 {
    color: var(--ui-text);
    font-size: 32px;
    letter-spacing: 0;
    line-height: 1.05;
}

.settings-header__identity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: var(--ui-card);
}

.settings-header__avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, var(--ui-accent), var(--ui-accent-strong));
}

.settings-header__status {
    font-size: 12px;
    font-weight: 700;
    color: var(--ui-muted);
    white-space: nowrap;
}

.settings-subtitle,
.settings-hint,
.session-meta {
    color: var(--ui-muted);
}

.settings-container {
    gap: 16px;
}

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

.settings-nav {
    position: sticky;
    top: calc(var(--header-fixed-height, 100px) + 18px);
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-panel);
    box-shadow: var(--ui-shadow-soft);
}

.settings-nav__item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 62px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ui-text);
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.settings-nav__item:hover,
.settings-nav__item.active {
    background: var(--ui-accent-soft);
    border-color: color-mix(in srgb, var(--ui-accent) 34%, var(--ui-line));
}

.settings-nav__item:hover {
    transform: translateY(-1px);
}

.settings-nav__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--ui-card);
    border: 1px solid var(--ui-line);
    color: var(--ui-accent);
}

.settings-nav__icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-nav__item strong,
.settings-nav__item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-nav__item strong {
    font-size: 14px;
    line-height: 1.25;
}

.settings-nav__item small {
    margin-top: 2px;
    color: var(--ui-muted);
    font-size: 12px;
    line-height: 1.25;
}

.settings-nav__item--danger .settings-nav__icon {
    color: var(--ui-danger);
    background: color-mix(in srgb, var(--ui-danger) 9%, var(--ui-card));
}

.settings-section {
    padding: 0;
    overflow: hidden;
    scroll-margin-top: calc(var(--header-fixed-height, 100px) + 24px);
}

.settings-section[hidden] {
    display: none !important;
}

.settings-section.settings-section--active {
    display: block;
}

.settings-section__title {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ui-line);
    background: color-mix(in srgb, var(--ui-panel-muted) 72%, #fff);
    color: var(--ui-text);
    font-size: 16px;
}

.settings-form {
    padding: 16px;
}

.settings-label {
    color: var(--ui-text);
    text-transform: none;
    letter-spacing: 0;
}

.settings-field input,
.settings-field textarea,
.settings-field select {
    min-height: 40px;
    border-radius: 10px !important;
}

.settings-field input:focus,
.settings-field textarea:focus,
.settings-field select:focus {
    border-color: var(--ui-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 18%, transparent);
}

.settings-field input[readonly],
.settings-field input:disabled {
    background: var(--ui-panel-muted) !important;
    color: var(--ui-muted) !important;
}

.settings-checkbox {
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-card);
}

.settings-checkbox input {
    margin-top: 2px;
    accent-color: var(--ui-accent);
}

.settings-checkbox span {
    color: var(--ui-text);
}

.settings-actions {
    margin: 0;
    padding: 16px 18px;
    background: var(--ui-panel-muted);
    border-top-color: var(--ui-line);
}

.session-item {
    border-color: var(--ui-line);
    background: var(--ui-card);
}

.settings-section--danger {
    border-color: color-mix(in srgb, var(--ui-danger) 40%, var(--ui-line)) !important;
    background: var(--ui-panel) !important;
}

.settings-section--danger .settings-section__title {
    color: var(--ui-danger);
    background: color-mix(in srgb, var(--ui-danger) 9%, var(--ui-panel-muted));
}

.settings-danger-btn,
.ghost-btn--danger {
    color: var(--ui-danger) !important;
    border-color: color-mix(in srgb, var(--ui-danger) 42%, var(--ui-line)) !important;
}

[data-theme="dark"] .profile-header,
[data-theme="dark"] .settings-header {
    background: linear-gradient(180deg, rgba(19, 29, 45, 0.98), rgba(15, 23, 37, 0.98));
}

[data-theme="dark"] .settings-nav__icon svg {
    stroke: currentColor;
}

[data-theme="dark"] .profile-pane,
[data-theme="dark"] .favorites-pane,
[data-theme="dark"] .chat-window,
[data-theme="dark"] .chat-list,
[data-theme="dark"] .settings-section,
[data-theme="dark"] .favorites-main,
[data-theme="dark"] .favorites-sidebar,
[data-theme="dark"] .profile-fav-main,
[data-theme="dark"] .profile-section-view {
    background: var(--ui-panel) !important;
    border-color: var(--ui-line) !important;
    box-shadow: var(--ui-shadow-soft);
}

[data-theme="dark"] .profile-card,
[data-theme="dark"] .chat-item,
[data-theme="dark"] .favorites-group-item,
[data-theme="dark"] .favorites-side-item,
[data-theme="dark"] .favorites-toolbar,
[data-theme="dark"] .chat-body,
[data-theme="dark"] .bubble,
[data-theme="dark"] .settings-checkbox,
[data-theme="dark"] .session-item {
    background: var(--ui-card) !important;
    border-color: var(--ui-line) !important;
}

[data-theme="dark"] .top-nav {
    background: rgba(14, 21, 34, 0.88) !important;
    border-color: var(--ui-line) !important;
}

@media (max-width: 980px) {
    .profile-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .favorites-layout,
    .messages-pane,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .favorites-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .favorites-groups {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .profile-pane,
    .favorites-pane,
    .chat-list,
    .chat-window {
        padding: 14px;
        border-radius: 14px !important;
    }

    .profile-header,
    .favorites-header,
    .profile-login {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-cards {
        grid-template-columns: 1fr;
    }

    .profile-login,
    .chat-input {
        grid-template-columns: 1fr;
    }

    .favorites-sidebar {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        grid-template-columns: 1fr;
    }

    .favorites-toolbar {
        align-items: stretch;
    }

    .favorites-sort,
    .favorites-filter,
    .favorites-collection,
    .chat-input button {
        width: 100%;
    }

    .settings-pane {
        padding: 14px 10px 28px;
    }

    .settings-header h1 {
        font-size: 28px;
    }
}

/* Settings redesign v2 */
.settings-pane {
    max-width: 1180px;
    padding: 20px 18px 42px;
}

.settings-header {
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid color-mix(in srgb, var(--ui-line) 78%, #d9e1ee);
    border-radius: 18px;
    background:
        radial-gradient(900px 260px at 100% -30%, rgba(40, 124, 255, 0.08), transparent 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 254, 0.98));
    box-shadow: 0 10px 30px rgba(16, 41, 79, 0.06);
    display: block;
}

.settings-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--ui-muted) 90%, #6d7f99);
}

.settings-header h1 {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 44px);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: #1a2437;
}

.settings-subtitle {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.45;
    color: #5c6f8f;
}

.settings-layout {
    display: grid;
    grid-template-columns: 296px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.settings-nav {
    top: calc(var(--header-fixed-height, 100px) + 16px);
    gap: 10px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--ui-line) 82%, #d5ddec);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
    box-shadow: 0 12px 26px rgba(22, 39, 69, 0.06);
}

.settings-nav__item {
    min-height: 68px;
    padding: 11px;
    border-radius: 14px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-nav__item:hover,
.settings-nav__item.active {
    background: linear-gradient(180deg, rgba(237, 245, 255, 0.95), rgba(232, 242, 255, 0.95));
    border-color: color-mix(in srgb, var(--ui-accent) 36%, var(--ui-line));
    box-shadow: inset 0 0 0 1px rgba(39, 116, 240, 0.14);
}

.settings-nav__item strong {
    font-size: 15px;
}

.settings-container {
    gap: 18px;
}

.settings-section {
    border-radius: 18px !important;
    border: 1px solid color-mix(in srgb, var(--ui-line) 76%, #d4dceb) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98)) !important;
    box-shadow: 0 16px 32px rgba(21, 34, 57, 0.06);
}

.settings-section__title {
    padding: 16px 18px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(245, 249, 255, 0.95), rgba(241, 247, 255, 0.95));
}

.settings-form {
    padding: 18px;
}

.settings-field input,
.settings-field textarea,
.settings-field select {
    min-height: 44px;
    border-radius: 12px !important;
    border-width: 1px;
}

.settings-checkbox {
    padding: 12px 13px;
    border-radius: 13px;
}

.settings-section .primary-btn {
    margin-top: 4px;
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .settings-pane {
        padding: 12px 10px 28px;
    }

    .settings-header {
        border-radius: 16px;
        padding: 16px;
    }

    .settings-header h1 {
        font-size: 30px;
    }

    .settings-subtitle {
        font-size: 15px;
    }

    .settings-nav {
        grid-template-columns: 1fr;
        border-radius: 15px;
    }

    .settings-section {
        border-radius: 16px !important;
    }

    .settings-section__title,
    .settings-form {
        padding-left: 14px;
        padding-right: 14px;
    }
}

[data-theme="dark"] .settings-header {
    background:
        radial-gradient(900px 260px at 100% -30%, rgba(67, 137, 255, 0.14), transparent 62%),
        linear-gradient(180deg, rgba(24, 32, 47, 0.98), rgba(18, 26, 39, 0.98));
    border-color: color-mix(in srgb, var(--ui-line) 95%, #2e415d);
}

[data-theme="dark"] .settings-eyebrow,
[data-theme="dark"] .settings-subtitle {
    color: #96a9c8;
}

[data-theme="dark"] .settings-header h1 {
    color: #e8efff;
}

/* Compact top navigation: smaller panel/buttons + cleaner action icons */
.top-nav {
    padding: 10px 14px;
}

.top-nav__right {
    gap: 8px;
}

.assistant-btn,
.top-nav__cta,
.top-nav__login {
    height: 46px;
    border-radius: 16px;
    padding: 0 14px;
    transform: none;
}

.top-nav__cta {
    min-width: 188px;
}

.top-nav__cta::before {
    width: 36px;
    height: 36px;
    opacity: 0.18;
}

.profile-chip,
.like-chip,
.message-chip {
    width: 46px;
    height: 46px;
    border-radius: 15px;
}

.top-actions .icon {
    width: 20px;
    height: 20px;
    color: #56657d;
}

.top-actions .icon svg {
    stroke-width: 2;
}

/* Keep desktop header proportions consistent after compacting right controls */
@media (min-width: 901px) {
    .top-nav {
        border-radius: 18px;
        padding: 8px 16px 4px;
    }

    .top-nav__primary {
        min-height: 64px;
        gap: 12px;
    }

    .top-nav__left {
        gap: 10px;
        min-width: 0;
    }

    .top-nav__logo {
        gap: 8px;
    }

    .logo-img {
        width: 72px;
        height: 72px;
        border-radius: 18px;
    }

    .logo-text {
        font-size: 24px;
        line-height: 1;
        letter-spacing: 0.01em;
    }
}

/* Guard against layout breaks from very long strings without spaces */
.detail-title,
.detail-location,
.detail-metro,
.price,
.price-note,
.detail-description p,
.card-title,
.card-meta {
    overflow-wrap: anywhere;
    word-break: break-word;
}
