* {
    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);
}

/* Рейтинг анкеты (Люди) */
.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: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    padding: 8px 24px 32px;
    min-height: 100vh;
    gap: 0;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.02);
    padding: 4px 24px 0;
    display: grid;
    gap: 3px;
}

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

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

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

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

.logo-img {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    display: block;
    background: rgba(255, 255, 255, 0.7);
    background-image: url('logo.png'), url('logo.jpg'), url('лого.jpg'), url('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: 31px;
    letter-spacing: 0.01em;
    line-height: 1;
    padding-bottom: 16px;
}

.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: 1px solid rgba(15, 62, 254, 0.25);
    background: rgba(15, 62, 254, 0.12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #0f3d9e;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 3;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 62, 254, 0.12),
                inset 0 0 16px rgba(255, 255, 255, 0.4);
    transition: background 0.2s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                border-color 0.2s ease,
                -webkit-backdrop-filter 0.2s ease,
                backdrop-filter 0.2s ease;
}

.assistant-btn:hover {
    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 {
    border: none;
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.85) 0%, rgba(31, 59, 115, 0.8) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-weight: 800;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(15, 98, 254, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset -1px -1px 0 rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                -webkit-backdrop-filter 0.2s ease,
                backdrop-filter 0.2s ease;
}

.top-nav__cta:hover {
    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:active {
    transform: translateY(0px);
}

.top-nav__login {
    border: 1px solid rgba(15, 62, 254, 0.25);
    background: rgba(15, 62, 254, 0.12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #0f62fe;
    font-weight: 700;
    padding: 11px 14px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 62, 254, 0.12),
                inset 0 0 16px rgba(255, 255, 255, 0.4);
    transition: background 0.2s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                border-color 0.2s ease,
                -webkit-backdrop-filter 0.2s ease,
                backdrop-filter 0.2s ease;
}

.top-nav__login:hover {
    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;
}

.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);
}

[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: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
                inset 0 0 20px rgba(255, 255, 255, 0.3),
                inset -1px -1px 0 rgba(0, 0, 0, 0.05);
    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,
                border-color 0.25s ease,
                -webkit-backdrop-filter 0.25s ease,
                backdrop-filter 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: 560px minmax(520px, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 0;
}

.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: center;
    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: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.06),
                inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    padding: 16px 18px 16px;
    width: 510px;
    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: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--accent);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
                inset 0 0 20px rgba(255, 255, 255, 0.3),
                inset -1px -1px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease,
                border-color 0.25s ease,
                -webkit-backdrop-filter 0.25s ease,
                backdrop-filter 0.25s ease;
}

.filter-btn: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);
}

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

.filter-btn__icon {
    color: currentColor;
}

.cards-viewport {
    overflow: hidden;
    width: 100%;
    max-width: 470px;
    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 {
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--panel);
    border: none;
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.06);
}

.action-btn {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 0 20px rgba(255, 255, 255, 0.3),
                inset -1px -1px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease,
                border-color 0.25s ease,
                -webkit-backdrop-filter 0.25s ease,
                backdrop-filter 0.25s ease;
}

.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.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12),
                inset 0 0 24px rgba(255, 255, 255, 0.4),
                inset -1px -1px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.divider {
    width: 1px;
    height: 34px;
    background: #e5e7eb;
}

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

.hidden {
    display: none;
}

.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: 24px 24px 22px;
    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: 16px;
}

.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: 12px;
    background: #f0f3f8;
}

.feature-icon {
    width: 18px;
    height: 18px;
    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 {
    color: var(--muted);
    font-size: 13px;
}

.feature-value {
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

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

.info-group ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.info-group li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
    font-size: 14px;
}

.info-group li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

.detail-location,
.detail-metro {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

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

.price {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
}

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

.detail-description h2 {
    font-size: 17px;
    margin-bottom: 8px;
}

.detail-description p {
    line-height: 1.6;
    color: #0f172a;
}

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

.primary-btn,
.ghost-btn {
    height: 48px;
    border-radius: 12px;
    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);
    color: #fff;
    border: none;
    box-shadow: 0 12px 28px rgba(31, 59, 115, 0.22);
}

.ghost-btn {
    background: #eef2f6;
    color: var(--accent);
}

.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-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;
}

.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;
}

.top-nav {
    top: 10px;
    width: calc(100% - 24px);
    margin: 0 auto;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.09);
    padding: 8px 20px 4px;
}

.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: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    padding: 4px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.mode-switch::before {
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.mode-btn {
    border-radius: 14px;
    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;
}

.action-btn {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.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: 540px;
}

.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-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(12, 20, 34, 0.42);
    color: #fff;
    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 svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.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) {
    .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;
    gap: 12px;
}

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

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

.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: #f3f7ff;
    text-shadow: 0 1px 8px rgba(77, 139, 255, 0.28);
}

[data-theme="dark"] .logo-img {
    box-shadow: 0 0 0 1px rgba(182, 204, 239, 0.2), 0 8px 18px rgba(0, 0, 0, 0.32);
}

[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"] .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"] .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.86);
    --aurora-center-pink: rgba(255, 52, 182, 0.82);
    --aurora-center-orange: rgba(255, 136, 31, 0.68);
    --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(249, 252, 255, 0.84);
}

[data-theme="dark"] .top-nav {
    background: rgba(10, 14, 23, 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(circle at 15% 14%, rgba(255, 234, 184, 0.55), rgba(255, 234, 184, 0) 42%),
        radial-gradient(circle at 86% 18%, rgba(205, 231, 255, 0.55), rgba(205, 231, 255, 0) 45%),
        radial-gradient(circle at 56% 78%, rgba(210, 249, 234, 0.45), rgba(210, 249, 234, 0) 44%),
        linear-gradient(180deg, #f8fbff 0%, #f1f6fd 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"] .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"] .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"] .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"] .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"] 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"] .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: 136px;
    --header-fixed-gap: 14px;
}

.top-nav {
    position: fixed !important;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1600px, calc(100% - 24px));
    z-index: 80;
}

.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;
    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;
    }

    .content-pane.has-detail.active > .app-shell {
        position: fixed !important;
        left: 16px;
        top: calc(var(--header-fixed-height) + var(--header-fixed-gap));
        width: 600px;
        max-width: calc(100vw - 48px);
        height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 14px);
        z-index: 15;
        margin: 0;
    }

    .content-pane.has-detail.active > .app-shell .swipe-stage {
        height: 100%;
    }

    .content-pane.has-detail.active > .detail-panel {
        margin-left: 632px;
        max-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 14px);
        min-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 14px);
        overflow-y: auto;
        padding-right: 6px;
    }
}

@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 Fix: Right Panel Width + Info Rows Typography ===== */
@media (min-width: 1200px) {
    .content-pane.has-detail.active {
        width: 100%;
        min-width: 0;
    }

    .content-pane.has-detail.active > .detail-panel {
        margin-left: 632px;
        width: calc(100vw - 632px - 24px);
        max-width: calc(100vw - 632px - 24px);
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .content-pane.has-detail.active > .detail-panel .detail-card {
        width: 100%;
        box-sizing: border-box;
    }
}

.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;
    }
}

/* ===== Final Polish: Fixed Right Panel + Clean Info Rows ===== */
@media (min-width: 1200px) {
    body {
        overflow-x: hidden;
    }

    .content-pane.has-detail.active > .detail-panel {
        position: fixed;
        top: calc(var(--header-fixed-height) + var(--header-fixed-gap));
        left: 632px;
        right: 16px;
        width: auto;
        max-width: none;
        min-width: 0;
        margin-left: 0;
        box-sizing: border-box;
        max-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 14px);
        min-height: calc(100dvh - var(--header-fixed-height) - var(--header-fixed-gap) - 14px);
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 10;
    }
}

@media (max-width: 1399px) and (min-width: 1200px) {
    .content-pane.has-detail.active > .app-shell {
        width: 540px;
    }

    .content-pane.has-detail.active > .detail-panel {
        left: 572px;
    }
}

.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,
[data-theme="dark"] .top-nav {
    background: rgba(10, 21, 40, 0.9) !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;
    inset: 0;
    z-index: 260;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.26s ease;
}

.survey-prompt-modal.open {
    pointer-events: auto;
    opacity: 1;
}

.survey-prompt-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 15, 26, 0.42);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.survey-prompt-modal__panel {
    position: relative;
    width: min(92vw, 520px);
    margin: min(14vh, 120px) auto 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 24px 60px rgba(10, 18, 35, 0.26);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 0.26s ease, opacity 0.26s ease;
    padding: 18px 18px 16px;
}

.survey-prompt-modal.open .survey-prompt-modal__panel {
    transform: translateY(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: 24px;
    letter-spacing: -0.02em;
}

.survey-prompt-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    color: var(--text);
}

.survey-prompt-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

.survey-prompt-modal__text {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.survey-prompt-modal__actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

[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__panel {
        width: min(94vw, 520px);
        margin-top: 12vh;
        border-radius: 16px;
        padding: 14px;
    }

    .survey-prompt-modal__header h3 {
        font-size: 21px;
    }

    .survey-prompt-modal__actions {
        justify-content: stretch;
        flex-direction: column;
    }
}

.assistant-modal {
    position: fixed;
    inset: 0;
    z-index: 280;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.24s ease;
}

.assistant-modal.open {
    pointer-events: auto;
    opacity: 1;
}

.assistant-modal__backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 95% 12%, rgba(47, 149, 255, 0.25), transparent 46%),
        rgba(7, 13, 26, 0.3);
    opacity: 0;
    transition: opacity 0.24s ease;
}

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

.assistant-modal__panel {
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: min(480px, calc(100vw - 20px));
    border: 1px solid rgba(113, 151, 229, 0.32);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 249, 255, 0.94));
    box-shadow: 0 32px 72px rgba(8, 16, 38, 0.36);
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: 12px;
    padding: 18px;
    transform: translateX(102%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.assistant-modal.open .assistant-modal__panel {
    transform: translateX(0);
}

.assistant-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.assistant-modal__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.assistant-modal__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}

.assistant-modal__subtitle {
    margin-top: 4px;
    color: #62769c;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.assistant-modal__close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    color: #102447;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.assistant-modal__close:hover {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 10px 20px rgba(10, 18, 35, 0.14);
}

.assistant-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

.assistant-modal__new {
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: #15315e;
    font-weight: 700;
    padding: 0 12px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.assistant-modal__new:hover {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 10px 20px rgba(10, 18, 35, 0.12);
}

.assistant-modal__new:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.assistant-chat {
    border: 1px solid rgba(124, 154, 219, 0.3);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(239, 246, 255, 0.88));
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px;
    min-height: 0;
    box-shadow: inset 0 0 0 1px rgba(79, 126, 211, 0.12);
}

.assistant-chat__empty {
    color: #607192;
    font-weight: 650;
}

.assistant-bubble {
    max-width: min(90%, 410px);
    border-radius: 14px;
    border: 1px solid rgba(128, 153, 201, 0.34);
    background: #fff;
    box-shadow: 0 12px 24px rgba(11, 24, 50, 0.08);
    padding: 12px 13px;
    display: inline-block;
    animation: assistantBubbleIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.assistant-bubble--user {
    margin-left: auto;
    background: linear-gradient(180deg, #ebf3ff 0%, #deebff 100%);
    border-color: rgba(95, 134, 210, 0.42);
}

.assistant-bubble__text {
    font-size: 15px;
    font-weight: 650;
    color: #112648;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.assistant-bubble__meta {
    margin-top: 7px;
    font-size: 12px;
    color: #667897;
}

.assistant-typing {
    border: 1px solid rgba(123, 151, 218, 0.3);
    border-radius: 12px;
    background: rgba(238, 245, 255, 0.85);
    color: #314a76;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 8px 10px;
    animation: assistantBubbleIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.assistant-typing.hidden {
    display: none;
}

.assistant-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4b6baa;
    animation: assistantTyping 1s ease-in-out infinite;
}

.assistant-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.assistant-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

.assistant-typing em {
    font-style: normal;
    font-size: 12px;
    font-weight: 650;
    margin-left: 4px;
}

.assistant-input {
    display: grid;
    grid-template-columns: 1fr 156px;
    gap: 10px;
    align-items: end;
}

.assistant-input textarea {
    min-height: 102px;
    max-height: 200px;
    border-radius: 15px;
    border: 1px solid rgba(117, 149, 218, 0.33);
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 14px;
    font-weight: 600;
    font-size: 16px;
    color: #102649;
    resize: vertical;
    line-height: 1.45;
    tab-size: 2;
    font-family: inherit;
}

.assistant-input button {
    border: none;
    border-radius: 15px;
    background: linear-gradient(180deg, #2d94ff, #0a84ff);
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    min-height: 56px;
    padding: 0 14px;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(10, 132, 255, 0.33);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.assistant-input button:hover {
    transform: translateY(-1px);
    filter: saturate(1.06);
    box-shadow: 0 18px 28px rgba(10, 132, 255, 0.42);
}

.assistant-input button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

[data-theme="dark"] .assistant-modal__panel {
    background: linear-gradient(180deg, rgba(14, 28, 52, 0.96), rgba(11, 23, 45, 0.96));
    border-color: rgba(124, 162, 238, 0.32);
}

[data-theme="dark"] .assistant-modal__subtitle,
[data-theme="dark"] .assistant-bubble__meta,
[data-theme="dark"] .assistant-chat__empty {
    color: #a4b7d8;
}

[data-theme="dark"] .assistant-modal__title,
[data-theme="dark"] .assistant-bubble__text {
    color: #e5eefc;
}

[data-theme="dark"] .assistant-chat {
    background: linear-gradient(180deg, rgba(10, 20, 39, 0.88), rgba(8, 16, 33, 0.9));
    border-color: rgba(120, 152, 220, 0.36);
}

[data-theme="dark"] .assistant-bubble {
    background: rgba(18, 35, 62, 0.95);
    border-color: rgba(114, 149, 220, 0.34);
}

[data-theme="dark"] .assistant-bubble--user {
    background: linear-gradient(180deg, rgba(24, 57, 106, 0.9), rgba(19, 48, 89, 0.94));
}

[data-theme="dark"] .assistant-typing,
[data-theme="dark"] .assistant-input textarea,
[data-theme="dark"] .assistant-modal__close,
[data-theme="dark"] .assistant-modal__new {
    background: rgba(17, 33, 58, 0.85);
    border-color: rgba(114, 149, 220, 0.34);
    color: #dbe8ff;
}

@media (max-width: 820px) {
    .assistant-modal__panel {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        border-radius: 0;
        padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
        transform: translateY(102%);
    }

    .assistant-modal.open .assistant-modal__panel {
        transform: translateY(0);
    }

    .assistant-modal__title {
        font-size: 20px;
    }

    .assistant-modal__subtitle {
        font-size: 13px;
    }

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

    .assistant-input button {
        width: 100%;
        min-height: 52px;
        font-size: 20px;
    }

    .assistant-chat {
        border-radius: 14px;
        padding: 12px;
    }

    .assistant-bubble {
        max-width: 92%;
    }
}

@media (max-width: 430px) {
    .assistant-modal__actions {
        gap: 6px;
    }

    .assistant-modal__new {
        padding: 0 10px;
        font-size: 14px;
    }

    .assistant-modal__close,
    .assistant-modal__new {
        height: 36px;
    }
}

@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;
        z-index: 180;
        margin: 0;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 10px;
        border-radius: 0;
        background: color-mix(in srgb, var(--panel) 92%, transparent);
        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 {
        min-height: 46px;
        padding: 0 10px;
        align-items: center;
        gap: 10px;
        border-radius: 14px;
        flex: 1;
        min-width: 0;
    }

    .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;
    }

    .content-pane.has-detail.active {
        display: block;
        padding: 0 0 20px;
        background: transparent;
    }

    .app-shell {
        padding: 6px 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: -12px;
        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: 46px;
        border-radius: 12px;
        font-size: 15px;
    }

    .map-block,
    .info-grid,
    .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;
}

@media (max-width: 900px) {
    .top-nav__mobile-menu-btn {
        display: inline-flex;
    }
}
