/* ─── Базовые стили и переменные ─────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --sun-light: #f4d282;
    --sun-glow: #eb741b;
    --sun-deep: #873012;
    --ocean-light: #7ca4bc;
    --ocean-mid: #6c94a4;
    --ocean-deep: #133a48;
    --sand-warm: #a89885;
    --sand-earth: #8d6941;
    --ocean-soft: #67949c;
    
    --gradient-sunset: linear-gradient(135deg, #f4d282 0%, #eb741b 50%, #873012 100%);
    --gradient-ocean: linear-gradient(135deg, #7ca4bc 0%, #6c94a4 50%, #133a48 100%);
    
    --color-bg: #f7f5f0;
    --color-bg-alt: #f0ede6;
    --color-card: #ffffff;
    --color-card-hover: #ffffff;
    --color-text: #133a48;
    --color-text-secondary: #6c94a4;
    --color-text-muted: #8d8070;
    --color-border: rgba(124,164,188,0.25);
    --color-accent: #eb741b;
    --color-warning:  rgb(235, 86, 27);
    --color-accent-hover: #873012;
    --color-link: #6c94a4;
    --color-link-hover: #eb741b;
    
    --shadow-sm: 0 1px 3px 0 rgba(19,58,72,0.06);
    --shadow-md: 0 4px 8px -1px rgba(19,58,72,0.1);
    --shadow-lg: 0 10px 20px -5px rgba(19,58,72,0.12);
    --shadow-xl: 0 20px 30px -8px rgba(19,58,72,0.15);
    --shadow-glow: 0 4px 20px rgba(235,116,27,0.2);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;
}

body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    font-family: var(--font-family, 'Inter'), sans-serif;
    color: var(--color-text);
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at 100% 0%, rgba(244,210,130,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 100%, rgba(124,164,188,0.08) 0%, transparent 50%);
    background-attachment: fixed;
    font-size: var(--font-size, 16px);
    color: var(--font-color, var(--color-text));
}

.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* ─── Общие компоненты ───────────────────────────────────────────────────── */
.btn { padding: 0.5rem 1.2rem; border-radius: var(--radius-sm); font-weight: 500; border: none; cursor: pointer; transition: all 0.2s; font-size: 0.875rem; font-family: var(--font-family, 'Inter'), sans-serif; gap: 0.35rem; }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--color-border);
    color: var(--color-link);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn svg {
    flex-shrink: 0;
    vertical-align: middle;
    position: relative;
    top: -0.5px;
}
.btn-outline:hover { border-color: var(--sun-glow); color: var(--color-accent); }
.btn-primary { background: var(--gradient-sunset); color: white; box-shadow: 0 2px 8px rgba(235,116,27,0.25); }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(235,116,27,0.35); transform: translateY(-1px); }

.section-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 2rem; color: var(--color-text); position: relative; display: inline-block; }
.section-title::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 60px; height: 3px; background: var(--gradient-sunset); border-radius: 3px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.section-header .section-title { margin-bottom: 0; }
.see-all { text-decoration: none; color: var(--color-link); font-weight: 500; transition: color 0.2s; }
.see-all:hover { color: var(--color-link-hover); }

/* ─── Бейджи ─────────────────────────────────────────────────────────────── */
.listing-type-badge { position: absolute; top: 0.75rem; left: 0.75rem; padding: 0.25rem 0.65rem; border-radius: var(--radius-xl); font-size: 0.75rem; font-weight: 600; box-shadow: var(--shadow-sm); color: white; }
.listing-type-sell { background: #16a34a; }
.listing-type-buy { background: #2563eb; }
.listing-type-service { background: #9333ea; }
.listing-type-rent { background: #d97706; }
.status-dot { width: 10px; height: 10px; border-radius: var(--radius-full); background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.4); }
.listing-status-badge, .listing-type-badge-text { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: var(--radius-sm); font-weight: 500; }
.status-active, .type-sell { background: rgba(34,197,94,0.1); color: #16a34a; }
.status-pending, .type-rent { background: rgba(245,158,11,0.1); color: #d97706; }
.status-inactive { background: rgba(239,68,68,0.1); color: #dc2626; }
.status-archived { background: rgba(100,116,139,0.1); color: #64748b; }
.type-buy { background: rgba(59,130,246,0.1); color: #2563eb; }
.type-service { background: rgba(168,85,247,0.1); color: #9333ea; }

/* ─── Навигация ──────────────────────────────────────────────────────────── */
.navbar { background: rgba(247,245,240,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; height: 56px; gap: 2rem; }
.nav-logo { text-decoration: none; font-size: 1.25rem; font-weight: 700; background: var(--gradient-sunset); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; flex-shrink: 0; }
.nav-menu { display: flex; align-items: center; gap: 0.25rem; flex: 1; }
.nav-link { text-decoration: none; color: var(--color-link); padding: 0.4rem 0.75rem; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.875rem; transition: all 0.2s; border: none; background: none; cursor: pointer; font-family: 'Inter', sans-serif; display: flex; align-items: center; gap: 0.25rem; }
.nav-link:hover, .nav-link.active { color: var(--color-accent); background: rgba(244,210,130,0.1); }
.nav-actions { display: flex; gap: 0.5rem; margin-left: auto; flex-shrink: 0; }
.nav-actions a { text-decoration: none; }
.categories-btn .chevron { transition: transform 0.3s; }
.categories-btn.active .chevron { transform: rotate(180deg); }

/* ─── Кнопка темы ────────────────────────────────────────────────────────── */
.theme-toggle { background: none; border: none; width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-secondary); transition: all 0.2s; }
.theme-toggle:hover { background: rgba(244,210,130,0.1); color: var(--color-accent); }

/* ─── Мега-меню ──────────────────────────────────────────────────────────── */
.mega-menu { position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.mega-menu.active { pointer-events: all; opacity: 1; }
.mega-menu-backdrop { position: absolute; inset: 0; background: rgba(19,58,72,0.5); backdrop-filter: blur(4px); }
.mega-menu-container { position: absolute; top: 56px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-xl); max-height: calc(100vh - 56px); overflow-y: auto; transform: translateY(-20px); transition: transform 0.3s; z-index: 1001; }
.mega-menu.active .mega-menu-container { transform: translateY(0); }
.mega-menu-inner { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.mega-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.mega-menu-header h3 { font-size: 1.3rem; font-weight: 700; color: var(--color-text); }
.mega-menu-close { background: var(--color-bg); border: none; width: 36px; height: 36px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-secondary); transition: all 0.2s; }
.mega-menu-close:hover { background: rgba(235,116,27,0.1); color: var(--color-accent); }
.mega-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.mega-category-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius-md); text-decoration: none; transition: all 0.2s; border: 1px solid transparent; background: var(--color-bg); }
.mega-category-card:hover { background: var(--color-card-hover); border-color: rgba(235,116,27,0.15); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.mega-category-icon { font-size: 2rem; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(244,210,130,0.2), rgba(235,116,27,0.1)); border-radius: var(--radius-md); flex-shrink: 0; }
.mega-category-info { display: flex; flex-direction: column; gap: 0.2rem; }
.mega-category-name { font-weight: 600; color: var(--color-text); font-size: 0.95rem; }
.mega-category-count { font-size: 0.8rem; color: var(--color-text-muted); }

/* ─── Мобильное меню ─────────────────────────────────────────────────────── */
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; z-index: 1001; }
.mobile-menu-btn span { width: 25px; height: 2px; background: var(--color-text); border-radius: 2px; transition: all 0.3s; }
.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu { display: none; flex-direction: column; padding: 0.75rem 1.5rem; background: white; border-bottom: 1px solid var(--color-border); gap: 0.25rem; position: fixed; top: 56px; left: 0; right: 0; z-index: 1000; max-height: calc(100vh - 56px); overflow-y: auto; }
.mobile-menu.active { display: flex; }
.mobile-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; text-decoration: none; color: var(--color-text); font-weight: 500; font-size: 0.95rem; border-radius: var(--radius-sm); background: none; border: none; cursor: pointer; font-family: 'Inter', sans-serif; width: 100%; text-align: left; transition: background 0.2s; }
.mobile-link:hover, .mobile-link.active { background: rgba(244,210,130,0.1); color: var(--color-accent); }
.mobile-actions { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem 0; margin-top: 0.5rem; border-top: 1px solid var(--color-border); }
.mobile-btn-full { width: 100%; text-align: center; padding: 0.65rem; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(180deg, rgba(244,210,130,0.12) 0%, rgba(247,245,240,1) 100%); padding: 5rem 1.5rem; text-align: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--color-border); }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: var(--radius-full); }
.hero::before { top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(244,210,130,0.18) 0%, transparent 70%); }
.hero::after { bottom: -30%; left: -10%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(124,164,188,0.12) 0%, transparent 70%); }
.hero-content { position: relative; z-index: 1; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; background: var(--gradient-sunset); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.75rem; line-height: 1.2; }
.hero-subtitle { font-size: 1.2rem; color: var(--color-link); margin-bottom: 2.5rem; font-weight: 400; }
.search-box { max-width: 600px; margin: 0 auto; display: flex; gap: 0.5rem; box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); }
.search-input { flex: 1; padding: 1rem 1.5rem; border: 2px solid transparent; border-radius: var(--radius-lg) 0 0 var(--radius-lg); font-size: 1rem; transition: all 0.3s; background: white; }
.search-input:focus { outline: none; border-color: var(--sun-glow); box-shadow: 0 0 0 3px rgba(235,116,27,0.1); }
.search-btn { padding: 1rem 2rem; background: var(--gradient-sunset); color: white; border: none; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(235,116,27,0.3); }
.search-btn:hover { box-shadow: 0 6px 25px rgba(235,116,27,0.5); }

/* ─── Сетка объявлений ──────────────────────────────────────────────────── */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.listing-card { background: var(--color-card); border-radius: var(--radius-lg); border: 1px solid var(--color-border); overflow: hidden; transition: all 0.3s; text-decoration: none; color: inherit; display: block; }
.listing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: rgba(108,148,164,0.3); }
.listing-image { height: 220px; background: linear-gradient(135deg, var(--color-bg), var(--color-bg-alt)); position: relative; overflow: hidden; }
.listing-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.listing-card:hover .listing-image img { transform: scale(1.05); }
.no-image, .no-image-large { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(244,210,130,0.15), rgba(124,164,188,0.12)); }
.no-image { font-size: 3.5rem; } .no-image-large { font-size: 5rem; }
.listing-body { padding: 1.25rem; }
.listing-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--color-text); }
.listing-price { font-size: 1.4rem; font-weight: 700; background: var(--gradient-sunset); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.75rem; }
.listing-meta { display: flex; justify-content: space-between; color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.listing-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--color-border); }
.listing-category { font-size: 0.8rem; background: linear-gradient(135deg, rgba(108,148,164,0.12), rgba(124,164,188,0.08)); padding: 0.3rem 0.8rem; border-radius: var(--radius-xl); color: var(--color-link); font-weight: 500; }
.listing-views { font-size: 0.85rem; color: var(--color-text-muted); }

/* ─── Категории ──────────────────────────────────────────────────────────── */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.category-card { background: var(--color-card); padding: 2rem 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--color-border); text-decoration: none; transition: all 0.3s; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; position: relative; overflow: hidden; }
.category-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-ocean); opacity: 0; transition: opacity 0.3s; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(108,148,164,0.3); }
.category-card:hover::before { opacity: 1; }
.category-icon { font-size: 2.5rem; transition: transform 0.3s; }
.category-card:hover .category-icon { transform: scale(1.1); }
.category-name { color: var(--color-text); font-size: 1rem; font-weight: 600; }
.category-count-badge { font-size: 0.8rem; color: var(--color-text-muted); background: rgba(108,148,164,0.12); padding: 0.2rem 0.6rem; border-radius: var(--radius-sm); font-weight: 500; }

/* ─── Страница категории ────────────────────────────────────────────────── */
.breadcrumbs { padding: 1.5rem 0; font-size: 0.9rem; }
.breadcrumbs a { color: var(--color-link); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--color-link-hover); }
.breadcrumbs .separator, .breadcrumbs .current { color: var(--color-text-muted); }
.breadcrumbs .separator { margin: 0 0.5rem; }
.category-header { margin-bottom: 2rem; }
.category-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; background: var(--gradient-sunset); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.category-count { color: var(--color-text-muted); font-size: 1rem; }
.subcategories { margin-bottom: 2rem; background: var(--color-card); padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.subcategories h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--color-text); font-weight: 600; }
.subcategories-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.subcategory-chip { background: linear-gradient(135deg, rgba(108,148,164,0.08), rgba(124,164,188,0.05)); padding: 0.5rem 1rem; border-radius: var(--radius-xl); text-decoration: none; color: var(--color-text); font-size: 0.9rem; transition: all 0.3s; border: 1px solid transparent; }
.subcategory-chip:hover { background: linear-gradient(135deg, rgba(108,148,164,0.15), rgba(124,164,188,0.1)); border-color: var(--ocean-mid); color: var(--color-link); transform: translateY(-2px); }
.filters-bar { display: flex; gap: 1rem; margin: 0.5rem 0; padding: 1rem 1.5rem; background: var(--color-card); border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.filter-select { padding: 0.5rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); background: white; font-family: 'Inter', sans-serif; cursor: pointer; color: var(--color-text); transition: border-color 0.2s; }
.filter-select:focus { outline: none; border-color: var(--ocean-mid); }
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.page-btn { padding: 0.6rem 1.2rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); background: white; cursor: pointer; transition: all 0.3s; font-weight: 500; color: var(--color-text); }
.page-btn:hover:not(:disabled) { border-color: var(--ocean-mid); color: var(--color-link); box-shadow: var(--shadow-glow); }
.page-btn.active { background: var(--gradient-sunset); color: white; border-color: transparent; box-shadow: 0 4px 15px rgba(235,116,27,0.3); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.listings-page { padding-top: 2rem; padding-bottom: 4rem; }
.listings-page .section-header { margin-bottom: 2rem; }
.listings-total { color: var(--color-text-muted); font-size: 1rem; font-weight: 500; }

/* ─── Страница объявления ────────────────────────────────────────────────── */
.listing-page { padding-top: 1.5rem; padding-bottom: 4rem; }
.listing-detail { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; margin-bottom: 2rem; align-items: start; }
.listing-gallery { position: relative; min-width: 0; }
.gallery-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(135deg, var(--color-bg), var(--color-bg-alt)); aspect-ratio: 4/3; max-height: 500px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.gallery-thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0; background: none; transition: all 0.2s; opacity: 0.6; }
.gallery-thumb.active { border-color: var(--ocean-mid); opacity: 1; }
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-info { display: flex; flex-direction: column; gap: 1.25rem; }
.listing-detail-title { font-size: 1.6rem; font-weight: 700; color: var(--color-text); line-height: 1.3; }
.price-value { font-size: 2rem; font-weight: 800; background: var(--gradient-sunset); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.price-value.free { background: var(--gradient-ocean); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.listing-detail-meta { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem; background: var(--color-bg); border-radius: var(--radius-md); }
.meta-item { display: flex; align-items: center; gap: 0.75rem; color: var(--color-text-muted); font-size: 0.9rem; }
.meta-item svg { flex-shrink: 0; color: var(--color-link); opacity: 0.8; }
.listing-contacts { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.contact-card { display: flex; align-items: center; gap: 1rem; }
.contact-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--gradient-sunset); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.contact-info { display: flex; flex-direction: column; }
.contact-name { font-weight: 600; color: var(--color-text); }
.contact-label { font-size: 0.8rem; color: var(--color-text-muted); }
.contact-actions { display: flex; gap: 0.5rem; }
.contact-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; }
.contact-avatar-link, .contact-name-link { text-decoration: none; color: inherit; }
.contact-name-link:hover { color: var(--color-accent); }
.listing-description, .listing-attributes { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; }
.listing-description { margin-bottom: 2rem; }
.description-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; color: var(--color-text); }
.description-text { color: var(--color-text-secondary); line-height: 1.7; font-size: 0.95rem; }
.no-description { color: var(--color-text-muted); font-style: italic; opacity: 0.7; }
.attributes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.5rem; }
.attribute-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-radius: var(--radius-sm); background: var(--color-bg); }
.attribute-name { color: var(--color-text-muted); font-size: 0.9rem; }
.attribute-value { font-weight: 600; color: var(--color-text); font-size: 0.9rem; }
.listing-manage { display: flex; gap: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--color-border); }

/* ─── Лайтбокс ───────────────────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,0.1); border: none; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; color: white; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-close { top: 1.5rem; right: 1.5rem; width: 44px; height: 44px; z-index: 1; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.lightbox-prev { left: 1.5rem; } .lightbox-next { right: 1.5rem; }

/* ─── Модальное окно ─────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal.active { opacity: 1; pointer-events: all; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19,58,72,0.5); backdrop-filter: blur(4px); }
.modal-content { position: relative; background: white; border-radius: var(--radius-xl); padding: 2.5rem 2rem; width: 90%; max-width: 400px; text-align: center; box-shadow: var(--shadow-xl); }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: var(--color-bg); border: none; width: 36px; height: 36px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-secondary); transition: all 0.2s; }
.modal-close:hover { background: rgba(235,116,27,0.1); color: var(--color-accent); }
.modal-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text); }
.modal-desc { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

/* Авторизация */
.auth-code { font-size: 3rem; font-weight: 800; letter-spacing: 0.5rem; background: var(--gradient-sunset); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.5rem; font-family: 'Courier New', monospace; cursor: pointer; transition: all 0.2s; display: inline-block; padding: 0.5rem 1rem; border-radius: var(--radius-md); user-select: all; }
.auth-code:hover { background: rgba(244,210,130,0.15); -webkit-text-fill-color: var(--color-accent); background-clip: unset; }
.auth-code.copied { animation: copyPulse 0.4s ease; }
@keyframes copyPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.auth-code-hint { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; gap: 0.35rem; opacity: 0.7; }
.auth-code-hint svg { width: 14px; height: 14px; }
.auth-refresh-btn { display: none; margin: 0 auto; }
.auth-refresh-btn.visible { display: inline-flex; }
.auth-timer { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.auth-timer.expired { color: #ef4444; }
.auth-status { font-size: 0.9rem; color: var(--color-link); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.auth-status.success { color: #22c55e; } .auth-status.error { color: #ef4444; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: var(--radius-full); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Методы входа */
.auth-methods { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; }
.auth-method-btn { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem; background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif; font-size: 0.95rem; color: var(--color-text); width: 100%; max-width: 250px; height: 50px; }
.auth-method-btn:hover { border-color: var(--sun-glow); background: white; box-shadow: var(--shadow-sm); }
.auth-method-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(244,210,130,0.2), rgba(235,116,27,0.1)); border-radius: var(--radius-sm); flex-shrink: 0; }
.auth-method-name { flex: 1; text-align: left; font-weight: 500; }
.auth-method-arrow { color: var(--color-text-muted); font-size: 1.1rem; }
.auth-method-vk { width: 100%; max-width: 250px; height: 50px; }
.auth-method-vk iframe { border-radius: var(--radius-md) !important; }
.auth-back-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: none; color: var(--color-text-muted); cursor: pointer; font-family: 'Inter', sans-serif; font-size: 0.85rem; padding: 0.5rem 0; margin-bottom: 1rem; transition: color 0.2s; }
.auth-back-btn:hover { color: var(--color-accent); }
.auth-back-btn svg { flex-shrink: 0; }

/* QR и диплинк */
.auth-qr { width: 180px; height: 180px; margin: 0.5rem auto; display: block; border-radius: var(--radius-md); border: 2px solid var(--color-border); padding: 4px; background: white; }
.auth-deeplink-btn { margin: 0.5rem auto 0; display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-size: 0.85rem; }
.auth-deeplink-section { margin-bottom: 1rem; }
.auth-manual-section { padding-top: 1rem; border-top: 1px solid var(--color-border); }
.auth-manual-hint { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }

/* ─── Профиль ─────────────────────────────────────────────────────────────── */
.profile-page { padding-top: 2rem; padding-bottom: 4rem; }
.profile-header { display: flex; align-items: center; gap: 1.5rem; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 2rem; }
.profile-avatar-large { width: 72px; height: 72px; border-radius: var(--radius-full); background: var(--gradient-sunset); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.8rem; flex-shrink: 0; }
.profile-info { flex: 1; }
.profile-name { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.settings-link { color: var(--color-text-secondary); transition: all 0.2s; display: flex; align-items: center; opacity: 0.5; }
.settings-link:hover { color: var(--color-accent); opacity: 1; transform: rotate(30deg); }
.profile-joined { color: var(--color-text-muted); font-size: 0.85rem; }
.logout-btn { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; flex-shrink: 0; }
.profile-actions { display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0; }
.profile-actions .btn { justify-content: center; display: flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.profile-section { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; }
.profile-section .section-title { margin-bottom: 1.5rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state p { margin-bottom: 1.5rem; font-size: 1rem; }
.profile-tabs { display: flex; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; margin-bottom: -1px; }
.profile-tab { flex: 1; padding: 0.85rem 1.5rem; background: var(--color-bg); border: none; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.9rem; color: var(--color-text-muted); cursor: pointer; transition: all 0.2s; border-bottom: 2px solid transparent; }
.profile-tab:hover { color: var(--color-text); background: white; }
.profile-tab.active { color: var(--color-link); background: white; border-bottom-color: var(--ocean-mid); }
.profile-tab-content { display: none; background: white; border: 1px solid var(--color-border); border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 2rem; }
.profile-tab-content.active { display: block; }

/* ─── Футер ──────────────────────────────────────────────────────────────── */
.footer { background: white; border-top: 1px solid var(--color-border); padding: 4rem 0 1.5rem; margin-top: 4rem; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-col h3 { background: var(--gradient-sunset); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-size: 1.3rem; margin-bottom: 1rem; font-weight: 700; }
.footer-col h4 { margin-bottom: 1rem; color: var(--color-text); font-weight: 600; }
.footer-col p, .footer-col a { color: var(--color-text-muted); text-decoration: none; display: block; margin-bottom: 0.75rem; font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--color-link); }
.footer-bottom { border-top: 1px solid var(--color-border); padding-top: 1.5rem; text-align: center; color: var(--color-text-muted); font-size: 0.9rem; }

/* ─── Чат ────────────────────────────────────────────────────────────────── */
.chat-panel { position: relative; background: white; width: 100%; height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-xl); }
@media (min-width: 769px) { .chat-panel { position: absolute; right: 0; top: 0; bottom: 0; width: 420px; } #chatModal .modal-backdrop { background: rgba(19,58,72,0.3); } }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.chat-header-info { display: flex; align-items: center; gap: 0.75rem; }
.chat-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--gradient-sunset); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; position: relative;}
.chat-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9ca3af;
    border: 2px solid var(--color-card);
    transition: background 0.3s;
}

.chat-avatar.online::after {
    background: #22c55e;
}
.chat-user-name { font-weight: 600; color: var(--color-text); font-size: 0.95rem; }
.chat-listing-title { font-size: 0.8rem; color: var(--color-link); max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; display: block; }
.chat-listing-title:hover { text-decoration: underline; }
.chat-close { background: none; border: none; width: 32px; height: 32px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-secondary); transition: all 0.2s; }
.chat-close:hover { background: rgba(235,116,27,0.1); color: var(--color-accent); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; background: var(--color-bg); }
.chat-empty { text-align: center; color: var(--color-text-muted); padding: 2rem; font-size: 0.9rem; }
.chat-message { display: flex; flex-direction: column; max-width: 80%; }
.chat-message.mine { align-self: flex-end; } .chat-message.theirs { align-self: flex-start; }
.chat-message-bubble { padding: 0.65rem 1rem; border-radius: var(--radius-lg); font-size: 0.9rem; line-height: 1.4; word-wrap: break-word; }
.chat-message.mine .chat-message-bubble { background: var(--gradient-sunset); color: white; border-bottom-right-radius: 4px; }
.chat-message.theirs .chat-message-bubble { background: white; color: var(--color-text); border-bottom-left-radius: 4px; border: 1px solid var(--color-border); }
.chat-message-time { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 0.2rem; padding: 0 0.25rem; }
.chat-message.mine .chat-message-time { text-align: right; }
.chat-input-area { display: flex; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--color-border); background: white; flex-shrink: 0; }
.chat-input { flex: 1; padding: 0.65rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-xl); font-size: 0.9rem; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s; }
.chat-input:focus { border-color: var(--ocean-mid); }
.chat-send-btn { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--gradient-sunset); border: none; color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.chat-send-btn:hover { box-shadow: var(--shadow-glow); transform: scale(1.05); }
.chat-send-btn:active { transform: scale(0.95); }
.typing-indicator { display: flex; gap: 4px; padding: 0.5rem 1rem; align-self: flex-start; }
.typing-indicator span { width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-muted); animation: typingBounce 1.4s infinite ease-in-out; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ─── Настройки ───────────────────────────────────────────────────────────── */
.settings-section { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 2rem; }
.settings-desc { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; margin-top: -1rem; }
.settings-list { display: flex; flex-direction: column; }
.setting-item { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 0 1.25rem 1rem; border-bottom: 1px solid var(--color-border); }
.setting-item:last-child { border-bottom: none; }
.setting-info { display: flex; align-items: center; gap: 1rem; }
.setting-icon { font-size: 1.5rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--color-bg); border-radius: var(--radius-md); flex-shrink: 0; }
.setting-name { font-weight: 600; color: var(--color-text); font-size: 0.95rem; margin-bottom: 0.15rem; }
.setting-hint { font-size: 0.8rem; color: var(--color-text-muted); }
.toggle { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 28px; transition: all 0.3s; }
.toggle-slider::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle input:checked + .toggle-slider { background: var(--gradient-sunset); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── Диалоги ────────────────────────────────────────────────────────────── */
.conversations-list { display: flex; flex-direction: column; }
.conversation-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--color-border); transition: background 0.2s; position: relative; border-radius: var(--radius-md); margin: 0.1rem -0.75rem; }
.conversation-item:hover { background: var(--color-bg); }
.conversation-item.unread { background: rgba(108,148,164,0.06); }
.conversation-avatar { width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--gradient-sunset); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; cursor: pointer; }
.conversation-info { flex: 1; min-width: 0; cursor: pointer; }
.conversation-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.2rem; }
.conversation-name { font-weight: 600; color: var(--color-text); font-size: 0.9rem; }
.conversation-time { font-size: 0.7rem; color: var(--color-text-muted); flex-shrink: 0; margin-left: 0.5rem; }
.conversation-preview { font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-listing-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, rgba(108,148,164,0.12), rgba(124,164,188,0.08)); display: flex; align-items: center; justify-content: center; color: var(--color-link); text-decoration: none; transition: all 0.2s; border: 1px solid transparent; }
.conversation-listing-thumb:hover { border-color: var(--ocean-mid); box-shadow: var(--shadow-sm); transform: scale(1.05); }
.conversation-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.unread-dot { position: absolute; top: 50%; left: -4px; transform: translateY(-50%); width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-accent); box-shadow: 0 0 6px rgba(235,116,27,0.4); }
.badge-container { position: relative; }
.unread-badge { position: absolute; top: -6px; right: -6px; background: #ef4444; color: white; font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: var(--radius-sm); font-weight: 700; line-height: 1; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.2); z-index: 1; }

/* ─── Форма объявления ───────────────────────────────────────────────────── */
.listing-form-page { padding-top: 2rem; padding-bottom: 4rem; max-width: 720px; }
.form-title { font-size: 2rem; font-weight: 700; margin-bottom: 2rem; color: var(--color-text); }
.listing-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--color-text); }
.form-input, .form-select, .form-textarea { padding: 0.75rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font-family: 'Inter', sans-serif; font-size: 0.95rem; color: var(--color-text); background: white; transition: border-color 0.2s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--sun-glow); box-shadow: 0 0 0 3px rgba(235,116,27,0.08); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.8rem; color: var(--color-text-muted); }
.form-actions { display: flex; gap: 1rem; padding-top: 1rem; }
.form-radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-radio { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.65rem 1.2rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); transition: all 0.2s; }
.form-radio:hover { border-color: var(--color-link); }
.form-radio input[type="radio"] { accent-color: var(--color-accent); }
.form-radio:has(input:checked) { border-color: var(--sun-glow); background: rgba(244,210,130,0.08); }
.radio-label { font-weight: 500; font-size: 0.9rem; }
.photo-upload-area { display: flex; flex-direction: column; gap: 0.75rem; }
.photo-previews { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.photo-preview { position: relative; width: 100px; height: 100px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--color-border); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: var(--radius-full); background: rgba(0,0,0,0.6); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; line-height: 1; }
.photo-main-badge { position: absolute; bottom: 4px; left: 4px; background: var(--gradient-sunset); color: white; font-size: 0.65rem; padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 600; }
.photo-add-btn { display: flex; align-items: center; gap: 0.5rem; padding: 1.5rem; border: 2px dashed var(--color-border); border-radius: var(--radius-md); cursor: pointer; color: var(--color-text-muted); transition: all 0.2s; justify-content: center; }
.photo-add-btn:hover { border-color: var(--color-link); color: var(--color-link); background: rgba(108,148,164,0.05); }
.existing-photo { position: relative; }

/* ─── Combo box ──────────────────────────────────────────────────────────── */
.combobox { position: relative; }
.combobox .form-input { width: 100%; }
.combobox-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto; z-index: 100; display: none; margin-top: 4px; }
.combobox-dropdown.visible { display: block; }
.combobox-item { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1rem; cursor: pointer; transition: background 0.1s; gap: 0.75rem; }
.combobox-item.has-children { font-weight: 600; color: var(--color-text); }
.combobox-item:hover, .combobox-item.highlighted { background: rgba(244,210,130,0.1); }
.combobox-name { color: var(--color-text); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combobox-parent { font-size: 0.75rem; color: var(--color-text-muted); flex-shrink: 0; }
.combobox-empty { padding: 1rem; text-align: center; color: var(--color-text-muted); font-size: 0.85rem; }
option[data-level] { padding-left: calc(attr(data-level) * 20px); }

/* ─── Toast ───────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 4000; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 0.75rem; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.85rem 1.25rem; box-shadow: var(--shadow-lg); pointer-events: all; animation: toastIn 0.3s ease; max-width: 380px; }
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 1.3rem; flex-shrink: 0; }
.toast-message { font-size: 0.9rem; color: var(--color-text); line-height: 1.3; }
.toast-close { background: none; border: none; font-size: 1.1rem; color: var(--color-text-muted); cursor: pointer; padding: 0 0.25rem; flex-shrink: 0; transition: color 0.2s; }
.toast-close:hover { color: var(--color-accent); }
.toast-info { border-left: 3px solid var(--ocean-mid); } .toast-success { border-left: 3px solid #22c55e; }
.toast-warning { border-left: 3px solid #f59e0b; } .toast-error { border-left: 3px solid #ef4444; }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ─── Публичная страница ─────────────────────────────────────────────────── */
.page-content { padding-top: 3rem; padding-bottom: 4rem; }
.static-page { max-width: 800px; margin: 0 auto; }
.static-page-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text); }
.static-page-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 2rem; }
.static-page-body { line-height: 1.8; color: var(--color-text); font-size: 1rem; }
.static-page-body h2 { font-size: 1.5rem; margin: 2rem 0 1rem; } .static-page-body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; }
.static-page-body p { margin-bottom: 1rem; } .static-page-body ul, .static-page-body ol { margin: 0.75rem 0 1rem 1.5rem; }
.static-page-body li { margin-bottom: 0.5rem; }
.preview-banner { background: #fef9e7; border: 1px solid rgba(235,180,0,0.2); border-radius: var(--radius-md); padding: 0.75rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9rem; color: #8d7000; display: flex; justify-content: space-between; align-items: center; }
.preview-banner a { color: var(--color-accent); text-decoration: none; font-weight: 500; }
.preview-banner a:hover { text-decoration: underline; }
.preview-badge { background: rgba(245,158,11,0.1); color: #d97706; padding: 0.15rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; }
.dev-banner { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 3000; display: flex; align-items: center; gap: 0.75rem; background: #fef9e7; border: 1px solid rgba(235,180,0,0.2); border-radius: var(--radius-lg); padding: 0.75rem 1rem; box-shadow: var(--shadow-lg); font-size: 0.85rem; color: #8d7000; }
.dev-banner button { background: none; border: none; font-size: 1.1rem; color: #b8960e; cursor: pointer; padding: 0 0.25rem; }
.dev-banner button:hover { color: var(--color-accent); }

/* ─── Специалисты (заявки, админка, каталог) ────────────────────────────── */
.apply-container { max-width: 600px; margin: 2rem auto; padding: 0 1rem; }
.apply-subtitle { color: var(--color-text-muted); margin-bottom: 2rem; font-size: 0.95rem; }
.apply-form { display: flex; flex-direction: column; gap: 1.25rem; }
.apply-form .form-group label { font-weight: 600; font-size: 0.9rem; color: var(--color-text); }
.apply-form .form-group input, .apply-form .form-group textarea, .apply-form .form-group select { padding: 0.75rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: 'Inter', sans-serif; color: var(--color-text); transition: border-color 0.2s; }
.apply-form .form-group input:focus, .apply-form .form-group textarea:focus, .apply-form .form-group select:focus { outline: none; border-color: var(--sun-glow); box-shadow: 0 0 0 3px rgba(235,116,27,0.08); }
.apply-form .form-group textarea { resize: vertical; min-height: 120px; }
.apply-form .form-group small { color: var(--color-text-muted); font-size: 0.8rem; }
.form-error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #dc2626; padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.9rem; }
.application-status-card { display: flex; gap: 1.25rem; padding: 1.25rem; border-radius: var(--radius-md); margin: 0; align-items: flex-start; }
.application-status-card.status-pending { background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.15); }
.application-status-card.status-approved { background: rgba(34,197,94,0.06); border: 1px solid rgba(34,197,94,0.15); }
.application-status-card.status-rejected { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.15); }
.application-status-card .status-icon { font-size: 2rem; flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: white; border-radius: var(--radius-md); }
.application-status-card .status-info { flex: 1; }
.application-status-card .status-info strong { display: block; font-size: 1rem; color: var(--color-text); margin-bottom: 0.25rem; }
.application-status-card .status-info p { margin: 0.25rem 0; font-size: 0.9rem; color: var(--color-text-secondary); }
.admin-container { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.admin-container .section-title { margin-bottom: 0.5rem; }
.admin-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.badge-pending { background: rgba(245,158,11,0.12); color: #b45309; padding: 0.25rem 0.75rem; border-radius: var(--radius-xl); font-size: 0.8rem; font-weight: 600; }
.application-card { padding: 1.25rem; border-radius: var(--radius-md); margin-bottom: 1rem; border: 1px solid var(--color-border); background: var(--color-card); transition: border-color 0.2s; }
.application-card:hover { border-color: rgba(108,148,164,0.3); }
.application-card.status-approved { border-left: 3px solid #22c55e; }
.application-card.status-rejected { border-left: 3px solid #ef4444; }
.app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.app-header strong { font-size: 1rem; color: var(--color-text); }
.status-badge { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: var(--radius-xl); font-weight: 500; white-space: nowrap; }
.status-badge.status-pending { background: rgba(245,158,11,0.1); color: #b45309; }
.status-badge.status-approved { background: rgba(34,197,94,0.1); color: #16a34a; }
.status-badge.status-rejected { background: rgba(239,68,68,0.1); color: #dc2626; }
.app-body p { margin: 0.35rem 0; font-size: 0.9rem; color: var(--color-text); }
.app-body .app-date { color: var(--color-text-muted); font-size: 0.85rem; }
.app-body .admin-note { color: var(--color-text-muted); font-size: 0.85rem; font-style: italic; }
.app-actions { display: flex; gap: 0.75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.loading { text-align: center; color: var(--color-text-muted); padding: 2rem; font-size: 0.9rem; }

/* ─── Специалист (шапка, каталог, витрина) ──────────────────────────────── */
.specialist-topbar { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
.specialist-back { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--color-text-secondary); text-decoration: none; transition: all 0.2s; flex-shrink: 0; }
.specialist-back:hover { background: rgba(235,116,27,0.1); color: var(--color-accent); }
.specialist-avatar-sm { width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--gradient-sunset); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.specialist-name-sm { font-weight: 600; font-size: 1rem; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.specialist-subtitle { margin-left: auto; font-size: 0.85rem; color: var(--color-text-muted); flex-shrink: 0; }
.specialists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.specialist-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; text-decoration: none; color: inherit; transition: all 0.3s; display: flex; gap: 1rem; }
.specialist-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(108,148,164,0.3); }
.specialist-card-avatar { width: 56px; height: 56px; border-radius: var(--radius-full); background: var(--gradient-sunset); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3rem; flex-shrink: 0; }
.specialist-card-body { flex: 1; min-width: 0; }
.specialist-card-name { font-size: 1.05rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.specialist-card-category { font-size: 0.8rem; color: var(--color-text-muted); display: block; margin-bottom: 0.5rem; }
.specialist-card-desc { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 0.75rem; line-height: 1.4; }
.specialist-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--color-text-muted); }
.specialist-card-services { font-weight: 600; color: var(--color-link); }
.specialist-card-cities { font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.specialist-profile-main { display: flex; flex-direction: column; gap: 1.5rem; }
.specialist-profile-sidebar { max-width: 800px; }
.specialist-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.specialist-actions-grid.single { grid-template-columns: 1fr; }
.specialist-clickable { cursor: pointer; transition: background 0.2s; }
.specialist-clickable:hover { background: rgba(244,210,130,0.05); }
.specialist-badge { position: absolute; top: -10px; right: -10px; font-size: 0.6rem; color: white; border-radius: var(--radius-sm); font-weight: 700; line-height: 1.4; min-width: 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0); }

/* ─── Календарь слотов ──────────────────────────────────────────────────── */
.slots-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; align-items: start; }
.slots-calendar { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; position: sticky; top: 72px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.calendar-month { font-weight: 700; font-size: 0.95rem; color: var(--color-text); }
.calendar-nav { background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-secondary); font-size: 0.85rem; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.calendar-nav:hover { border-color: var(--sun-glow); color: var(--color-accent); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.calendar-weekdays span { text-align: center; font-size: 0.7rem; font-weight: 600; color: var(--color-text-muted); padding: 0.35rem 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; border-radius: var(--radius-sm); transition: all 0.15s; color: var(--color-text); position: relative; overflow: hidden; }
.calendar-day.empty { cursor: default; }
.calendar-day.past, .calendar-day.no-slots { opacity: 0.35; cursor: default; }
.calendar-day.no-slots { background-image: repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(239,68,68,0.322) 2px, rgba(239,68,68,0.322) 4px); }
.calendar-day.free { font-weight: 900; cursor: pointer; border: 2px solid rgba(34,197,94,0.322); }
.calendar-day.free:hover { background: rgba(34,197,94,0.322); }
.calendar-day.today { font-weight: 700; color: var(--color-accent); opacity: 1; }
.calendar-day.has-slots::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--ocean-mid); }
.calendar-day.has-free { box-shadow: inset 0 0 0 2px rgba(34,197,94,0.4); }
.calendar-day.has-full { box-shadow: inset 0 0 0 2px rgba(239,68,68,0.35); }
.calendar-day.selected { background: var(--gradient-sunset); color: white; font-weight: 700; border: none; }
.calendar-day.selected:hover { background: var(--gradient-sunset) !important; color: white; opacity: 1; border: none; }
.calendar-day.selected.has-slots::after { background: white; }
.slots-day { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; min-height: 400px; }
.slots-day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.slots-day-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--color-text); margin: 0; }
.slots-day-list { display: flex; flex-direction: column; gap: 0.5rem; }
.slot-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); border: 1px solid var(--color-border); transition: border-color 0.2s; }
.slot-item:hover { border-color: rgba(108,148,164,0.3); }
.slot-item.booked { background: var(--color-bg); opacity: 0.7; }
.slot-time { flex-shrink: 0; width: 110px; }
.slot-time-range { font-weight: 600; font-size: 0.9rem; color: var(--color-text); }
.slot-info { flex: 1; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.slot-resource { font-size: 0.85rem; color: var(--color-text); background: rgba(108,148,164,0.1); padding: 0.2rem 0.6rem; border-radius: var(--radius-xl); }
.slot-service { font-size: 0.85rem; color: var(--color-link); }
.slot-status { font-size: 0.8rem; padding: 0.15rem 0.5rem; border-radius: var(--radius-xl); font-weight: 500; }
.slot-status.free { background: rgba(34,197,94,0.1); color: #16a34a; }
.slot-status.booked { background: rgba(239,68,68,0.1); color: #dc2626; }
.slot-delete-btn { background: none; border: none; width: 28px; height: 28px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-muted); transition: all 0.2s; }
.slot-delete-btn:hover { background: rgba(239,68,68,0.1); color: #dc2626; }

/* ─── Модальная панель ──────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(19,58,72,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; backdrop-filter: blur(4px); }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-panel { background: var(--color-card); border-radius: var(--radius-xl); padding: 2rem; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); }
.modal-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-panel-header h3 { font-size: 1.2rem; font-weight: 700; color: var(--color-text); }
.modal-panel-close { background: var(--color-bg); border: none; width: 36px; height: 36px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-secondary); transition: all 0.2s; }
.modal-panel-close:hover { background: rgba(235,116,27,0.1); color: var(--color-accent); }
.schedule-modal-panel { background: var(--color-card);border-radius: var(--radius-xl); padding: 2rem; width: 95%; max-width: 800px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: var(--shadow-xl); }
.schedule-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; flex: 1; min-height: 0; }
.schedule-calendar { background: var(--color-bg); border-radius: var(--radius-md); padding: 1rem; }
.schedule-slots { display: flex; flex-direction: column; min-height: 0; }
.schedule-slots h4 { margin-bottom: 1rem; font-size: 1rem; color: var(--color-text); flex-shrink: 0; }
.schedule-slots-scroll { flex: 1; overflow-y: auto; min-height: 0; padding-right: 0.5rem; }
.schedule-slots-scroll::-webkit-scrollbar { width: 5px; }
.schedule-slots-scroll::-webkit-scrollbar-track { background: transparent; }
.schedule-slots-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-sm); }

/* ─── Бронирование ──────────────────────────────────────────────────────── */
.booking-modal { position: fixed; inset: 0; z-index: 2000; background: var(--color-card); opacity: 0; pointer-events: none; transition: opacity 0.3s; display: flex; flex-direction: column; }
.booking-modal.active { opacity: 1; pointer-events: all; }
.booking-modal-content { flex: 1; overflow-y: auto; padding: 1.5rem; }
.booking-step { max-width: 600px; margin: 0 auto; }
.booking-back { background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-secondary); margin-bottom: 1.5rem; }
.booking-header { margin-bottom: 2rem; }
.booking-label { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.25rem; }
.booking-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.booking-options h3 { font-size: 1rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.booking-calendar-container { display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; align-items: start; }
.booking-slots { min-height: 200px; }

/* ─── Прочие компоненты ─────────────────────────────────────────────────── */
.collapsible-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.collapsible-header .sidebar-toggle { background: none; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-muted); transition: all 0.2s; flex-shrink: 0; }
.collapsible-header .sidebar-toggle:hover { border-color: var(--sun-glow); color: var(--color-accent); }
.collapsible-header .sidebar-toggle svg { transition: transform 0.3s; }
.collapsible-body .description-text { margin-top: 1rem; }
.tab-edit-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 4px; margin-left: 0.35rem; opacity: 0.4; transition: all 0.2s; cursor: pointer; color: var(--color-text-muted); }
.tab-edit-icon:hover { opacity: 1; color: var(--color-accent); background: rgba(244,210,130,0.1); }
.search-type-btn { padding: 0.3rem 0.4rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); background: white; cursor: pointer; color: var(--color-text-muted); transition: all 0.2s; line-height: 1; }
.search-type-btn.active { border-color: var(--color-accent); color: var(--color-accent); background: rgba(244,210,130,0.1); }
.search-type-btn:hover { border-color: var(--sun-glow); }
.slot-grid-view { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.slot-grid-view .setting-item { flex-direction: column; align-items: flex-start; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.slot-grid-view .setting-item:last-child { padding-bottom: 1rem; }
.profile-appointments-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }

/* ─── Адаптивность ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; } .nav-menu { display: none; } .mobile-menu.active { display: flex; }
    .mega-menu-container { top: 0; } .mega-menu-grid { grid-template-columns: 1fr; }
    .search-box { flex-direction: column; } .search-input, .search-btn { border-radius: var(--radius-md); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .listings-grid, .specialists-grid { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; }
    .listing-detail { grid-template-columns: 1fr; gap: 1.5rem; }
    .gallery-main { max-height: 350px; } .gallery-thumbs { flex-wrap: wrap; } .gallery-thumb { width: 60px; height: 60px; }
    .listing-detail-title { font-size: 1.3rem; } .price-value { font-size: 1.6rem; }
    .contact-actions { flex-direction: column; }
    .listing-description, .listing-attributes { padding: 1.25rem; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-actions { flex-direction: row; width: 100%; } .profile-actions .btn { flex: 1; }
    .logout-btn { width: 100%; justify-content: center; }
    .profile-tab { padding: 0.75rem 1rem; font-size: 0.85rem; } .profile-tab-content { padding: 1rem; }
    .conversation-item { padding: 0.75rem; gap: 0.75rem; } .conversation-avatar { width: 40px; height: 40px; font-size: 0.95rem; }
    .toast-container { top: 1rem; right: 1rem; left: 1rem; } .toast { max-width: 100%; }
    .slots-layout, .schedule-layout, .booking-calendar-container, .specialist-actions-grid, .profile-appointments-layout { grid-template-columns: 1fr; }
    .slots-calendar { position: static; }
    .slot-time { width: 90px; } .slot-time-range { font-size: 0.8rem; }
    .schedule-modal-panel { width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; }
    .slot-grid-view { grid-template-columns: 1fr; }
    #appointmentsModal .modal-content { max-width: 100% !important; max-height: 100vh !important; height: 100vh; border-radius: 0; padding: 2rem 1.5rem; overflow-y: auto; }
    .nav-container {
            justify-content: space-between;
        }
        .nav-logo {
            margin-right: auto;
        }
        .theme-toggle {
            margin-left: 0.5rem;
            order: 1; /* после бургера, крайний справа */
        }
        .mobile-menu-btn {
            order: 0;
        }

    .hero::before,
    .hero::after {
        display: none;
        }

            .post-carousel-btn {
            display: none; /* на мобилке только свайпы */
        }
        .post-carousel-slide {
            aspect-ratio: 1/1;
        }

    input[name="slug"] {
            padding-left: 0.75rem !important;
        }
        /* Текст "sakh.living/specialist/" — скрываем или переносим */
        input[name="slug"]::placeholder {
            content: "Ваш псевдоним";
        }
        
    .slug-input {
        padding-left: 0.75rem;
    } 
    
    .specialist-card {
        max-width: 100%;
        min-width: 0;
    }
    .specialist-card-cities {
        max-width: none;
    }

}

.slug-input {
    padding-left: 175px;
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr; }
    .hero { padding: 3rem 1rem; }
}

/* ─── Тёмная тема ────────────────────────────────────────────────────────── */
[data-theme="dark"] {
    --color-bg: #1a1d23;
    --color-bg-alt: #22262d;
    --color-card: #282c34;
    --color-card-hover: #32373f;
    --color-text: #e1e4e8;
    --color-text-secondary: #8b949e;
    --color-text-muted: #6e7681;
    --color-border: rgba(139,148,158,0.2);
    --color-link: #7ca4bc;
    --color-link-hover: #eb741b;
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.3);
    --shadow-md: 0 4px 8px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 20px -5px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 30px -8px rgba(0,0,0,0.6);
    --shadow-glow: 0 4px 20px rgba(235,116,27,0.3);
}

[data-theme="dark"] .navbar,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .chat-panel,
[data-theme="dark"] .listing-card,
[data-theme="dark"] .category-card,
[data-theme="dark"] .footer,
[data-theme="dark"] .profile-header,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .settings-section,
[data-theme="dark"] .listing-contacts,
[data-theme="dark"] .listing-description,
[data-theme="dark"] .toast,
[data-theme="dark"] .mega-menu-container,
[data-theme="dark"] .mobile-menu,
[data-theme="dark"] .combobox-dropdown,
[data-theme="dark"] .subcategories,
[data-theme="dark"] .filters-bar,
[data-theme="dark"] .pagination .page-btn,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .chat-input-area,
[data-theme="dark"] .application-card,
[data-theme="dark"] .specialist-card,
[data-theme="dark"] .slots-calendar,
[data-theme="dark"] .slots-day,
[data-theme="dark"] .schedule-modal-panel,
[data-theme="dark"] .booking-modal,
[data-theme="dark"] .modal-panel,
[data-theme="dark"] .specialist-topbar,
[data-theme="dark"] .slot-item,
[data-theme="dark"] .search-type-btn,
[data-theme="dark"] .admin-editor { background: var(--color-card); }

[data-theme="dark"] .chat-message.theirs .chat-message-bubble {
    background: #2a2f38; color: #e1e4e8; border-color: rgba(139,148,158,0.3);
}

[data-theme="dark"] .ql-editor { color: #e1e4e8; background: #1a1d23; }
[data-theme="dark"] .ql-toolbar { background: #282c34; border-color: rgba(139,148,158,0.2); }
[data-theme="dark"] .ql-toolbar .ql-stroke { stroke: #8b949e; }
[data-theme="dark"] .ql-toolbar .ql-fill { fill: #8b949e; }
[data-theme="dark"] .ql-toolbar button:hover .ql-stroke { stroke: var(--color-accent); }
[data-theme="dark"] .ql-container { border-color: rgba(139,148,158,0.2); }

[data-theme="dark"] .chat-messages { background: #1a1d23; }
[data-theme="dark"] .chat-input { background: #1a1d23; color: #e1e4e8; }
[data-theme="dark"] .chat-empty { color: #8b949e; }
[data-theme="dark"] .toast { background: #282c34; color: #e1e4e8; }
[data-theme="dark"] .modal-content { background: #282c34; }
[data-theme="dark"] .modal-close { background: #1a1d23; }
[data-theme="dark"] .spinner { border-color: rgba(139,148,158,0.3); }
[data-theme="dark"] .search-input { background: #1a1d23; color: #e1e4e8; }
[data-theme="dark"] .search-input::placeholder { color: #6e7681; }
[data-theme="dark"] .toggle-slider { background: #3a3f4a; }
[data-theme="dark"] .CodeMirror { background: #1a1d23; color: #e1e4e8; border-color: rgba(139,148,158,0.2); }

[data-theme="dark"] .calendar-month,
[data-theme="dark"] .calendar-weekdays span,
[data-theme="dark"] .slot-time-range,
[data-theme="dark"] .slot-resource,
[data-theme="dark"] .slot-service,
[data-theme="dark"] .schedule-slots h4,
[data-theme="dark"] .booking-header h2,
[data-theme="dark"] .booking-label,
[data-theme="dark"] .booking-options h3 { color: var(--color-text); }

[data-theme="dark"] .specialist-card-cities,
[data-theme="dark"] .specialist-subtitle,
[data-theme="dark"] .calendar-nav,
[data-theme="dark"] .booking-back { color: var(--color-text-muted); }

[data-theme="dark"] .page-editor-form input,
[data-theme="dark"] .page-editor-form select,
[data-theme="dark"] .page-editor-form textarea,
[data-theme="dark"] .search-type-btn,
[data-theme="dark"] .slot-item { color: var(--color-text); border-color: var(--color-border); }

[data-theme="dark"] .slot-item:hover,
[data-theme="dark"] .application-card:hover { border-color: rgba(108,148,164,0.3); }

[data-theme="dark"] .schedule-calendar { background: var(--color-bg-alt); }
[data-theme="dark"] .slot-item.booked { background: var(--color-bg); }
[data-theme="dark"] .auth-qr { background: white; }
[data-theme="dark"] .profile-tab.active,
[data-theme="dark"] .profile-tab-content.active {
    background: var(--color-card);
    color: var(--color-text);
}

[data-theme="dark"] .profile-tab {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

[data-theme="dark"] .profile-tab:hover {
    background: var(--color-card);
    color: var(--color-text);
}

[data-theme="dark"] .profile-tab-content {
    background: var(--color-card);
    color: var(--color-text);
}

[data-theme="dark"] .dashboard-calendar,
[data-theme="dark"] .dashboard-slots,
[data-theme="dark"] .dashboard-detail {
    background: var(--color-card);
    color: var(--color-text);
}

[data-theme="dark"] .dashboard-calendar .calendar-month,
[data-theme="dark"] .dashboard-slots h3,
[data-theme="dark"] .dashboard-detail h3,
[data-theme="dark"] .dashboard-slots .slot-time-range,
[data-theme="dark"] .dashboard-detail .slot-time-range {
    color: var(--color-text);
}

[data-theme="dark"] .dashboard-slots .slot-item {
    background: var(--color-card);
    border-color: var(--color-border);
}

.avatar-upload-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--gradient-sunset);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.profile-avatar-large {
    cursor: pointer;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-sm { width: 36px; height: 36px; border-radius: 50%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.avatar-md { width: 48px; height: 48px; border-radius: 50%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.8rem; flex-shrink: 0; }
.avatar-xl { width: 120px; height: 120px; border-radius: 50%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 2.5rem; flex-shrink: 0; }

.subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.subscribe-btn.subscribed {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(244,210,130,0.1);
}

.combobox-item.disabled {
    opacity: 0.6;
    cursor: default;
}
.combobox-item.disabled:hover {
    background: transparent;
}

.resource-name-link {
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border-bottom: 1.5px dashed var(--color-border);
    transition: all 0.2s;
}
.resource-name-link:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.calendar-day.work-day {
    background: rgba(34,197,94,0.12) !important;
    cursor: pointer;
}
.calendar-day.work-day:hover {
    background: rgba(34,197,94,0.22) !important;
}
.calendar-day.work-day.selected {
    background: var(--gradient-sunset) !important;
    color: white;
}
.calendar-day.day-off {
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(239,68,68,0.322) 2px, rgba(239,68,68,0.322) 4px);
    cursor: pointer;
}
.calendar-day.day-off.selected {
    background: var(--gradient-sunset) !important;
    background-image: none !important;
    color: white;
}

/* ─── Теги ресурсов в расписании ─────────────────────────────────────────── */
.schedule-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.schedule-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    background: linear-gradient(135deg, rgba(108,148,164,0.08), rgba(124,164,188,0.05));
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--color-text);
    transition: all 0.2s;
}

.schedule-tag:hover {
    border-color: rgba(108,148,164,0.4);
    background: linear-gradient(135deg, rgba(108,148,164,0.12), rgba(124,164,188,0.08));
}

.schedule-tag-name {
    font-weight: 600;
    color: var(--color-link);
}

.schedule-tag-time {
    color: var(--color-text-muted);
}

.schedule-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
    opacity: 0.5;
}

.schedule-tag-remove:hover {
    background: rgba(239,68,68,0.12);
    color: #dc2626;
    opacity: 1;
}

/* День без ресурсов (выходной для всех) */
.schedule-tag.day-off {
    background: rgba(239,68,68,0.06);
    border-color: rgba(239,68,68,0.2);
    color: #dc2626;
}

.schedule-tag.day-off .schedule-tag-name {
    color: #dc2626;
}

/* Разделитель между формой и тегами */
.schedule-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1rem 0;
}

/* ─── Подсветка рабочих/выходных дней в расписании ─────────────────────── */
.calendar-day.work-day {
    background: rgba(34,197,94,0.12) !important;
    cursor: pointer;
}
.calendar-day.work-day:hover {
    background: rgba(34,197,94,0.22) !important;
}
.calendar-day.work-day.selected {
    background: var(--gradient-sunset) !important;
    color: white;
}

.calendar-day.day-off {
    background-color: transparent !important;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(239,68,68,0.25) 3px,
        rgba(239,68,68,0.25) 6px
    ) !important;
    cursor: pointer;
}
.calendar-day.day-off:hover {
    background-color: rgba(239,68,68,0.05) !important;
}
.calendar-day.day-off.selected {
    background: var(--gradient-sunset) !important;
    background-image: none !important;
    color: white;
}

/* ─── Wizard ─────────────────────────────────────────────────────────────── */
.wizard-modal {
    position: fixed; inset: 0; z-index: 2000;
    background: var(--color-card);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
    display: flex; flex-direction: column;
    overflow: hidden; /* скрываем скролл на модалке */
}
.wizard-modal.active { opacity: 1; pointer-events: all; }
.wizard-container {
    background: var(--color-card);
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.wizard-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(19, 58, 72, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center; justify-content: center;
    padding: 0;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.wizard-overlay.active { display: flex; opacity: 1; pointer-events: all; }

.wizard-step {
    max-width: 600px; 
    margin: 0 auto; 
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    max-height: 100%;
    overflow-y: auto;
}
.wizard-header { margin-bottom: 2rem; }
.wizard-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.wizard-subtitle { font-size: 0.9rem; color: var(--color-text-muted); margin-top: 0.25rem; }
.wizard-back, .wizard-close {
    background: var(--color-bg); border: none;
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--color-text-secondary);
    margin-bottom: 1rem; transition: all 0.2s;
}
.wizard-back:hover, .wizard-close:hover { background: rgba(235,116,27,0.1); color: var(--color-accent); }

.wizard-choices { display: flex; flex-direction: column; gap: 1rem; }
.wizard-choice-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 2rem; border: 2px solid var(--color-border);
    border-radius: var(--radius-xl); background: var(--color-bg);
    cursor: pointer; transition: all 0.3s; text-align: center;
    font-family: 'Inter', sans-serif; color: var(--color-text);
}
.wizard-choice-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.wizard-choice-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.wizard-choice-title { font-size: 1.1rem; font-weight: 700; }
.wizard-choice-desc { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.25rem; }

/* Услуги */
.wizard-services { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.wizard-service-item {
    margin: 0.2rem;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1rem; background: var(--color-bg);
    border-radius: var(--radius-md); cursor: pointer;
    transition: background 0.2s;
}
.wizard-service-item:hover { background: rgba(244,210,130,0.08); }
.wizard-service-item:has(input:checked) { background: rgba(244,210,130,0.12); border: 1px solid rgba(235,116,27,0.3); }
.wizard-service-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--color-accent); }
.wizard-service-info { margin: 10px; display: flex; flex-direction: column; }
.wizard-service-name { font-weight: 600; font-size: 0.95rem; }
.wizard-service-meta { font-size: 0.8rem; color: var(--color-text-muted); }
.wizard-summary {
    padding: 0.75rem 1rem; background: rgba(34,197,94,0.06);
    border-radius: var(--radius-md); margin-bottom: 1.5rem;
    font-size: 0.9rem; color: var(--color-text);
}

.wizard-folder-header {
    cursor: pointer;
    user-select: none;
}
.wizard-folder-header span:last-child {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: var(--color-text-muted);
    text-underline-offset: 4px;
    transition: all 0.15s;
}
.wizard-folder-header:hover span:last-child {
    text-decoration-style: solid;
    text-decoration-color: var(--color-accent);
}

/* Ресурсы */
.wizard-resource-section { margin-top: 0.5rem; }
.wizard-resource-section h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--color-text); }
.wizard-resource-list { display: flex; flex-direction: column; gap: 0.5rem; }
.wizard-resource-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; background: var(--color-bg);
    border: 1px solid transparent; border-radius: var(--radius-md);
    cursor: pointer; transition: all 0.2s;
    font-family: 'Inter', sans-serif; font-size: 0.95rem;
    color: var(--color-text); width: 100%; text-align: left;
}
.wizard-resource-item:hover { border-color: var(--color-border); background: white; }
.wizard-resource-item.selected { border-color: var(--color-accent); background: rgba(244,210,130,0.08); }
.wizard-resource-icon { font-size: 1.3rem; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(108,148,164,0.1); border-radius: 50%; }
.wizard-resource-hint { font-size: 0.8rem; color: var(--color-text-muted); margin-left: auto; }
.wizard-next-btn { width: 100%; margin-top: 1rem; padding: 0.85rem; font-size: 1rem; }

/* Календарь в визарде */
.wizard-calendar-section { margin-bottom: 1.5rem; }
.wizard-calendar-section .slots-calendar { position: static; }

/* Таймлайн */
.timeline { display: flex; flex-direction: column; gap: 2px; }
.timeline-slot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1rem; border-radius: var(--radius-md);
    transition: all 0.2s;
}
.timeline-slot.free { background: rgba(34,197,94,0.08); cursor: pointer; border: 1px solid rgba(34,197,94,0.2); }
.timeline-slot.free:hover { background: rgba(34,197,94,0.15); }
.timeline-slot.busy { background: rgba(239,68,68,0.06); cursor: default; }
.timeline-time { font-weight: 600; font-size: 0.95rem; color: var(--color-text); }
.timeline-status { font-size: 0.8rem; }
.timeline-slot.free .timeline-status { color: #16a34a; }
.timeline-slot.busy .timeline-status { color: #dc2626; }

@media (min-width: 769px) {
    .wizard-modal { 
        position: fixed; top: 50%; left: 50%; 
        transform: translate(-50%, -50%);
        width: 480px; height: 85vh; 
        border-radius: var(--radius-xl); 
        box-shadow: var(--shadow-xl);
        opacity: 0; pointer-events: none;
    }
    .wizard-modal.active { opacity: 1; pointer-events: all; }
    /* Скролл внутри контейнера, а не на модалке */
    .wizard-overlay { padding: 2rem; }
    .wizard-container {
        width: 480px; height: 85vh;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-xl);
        overflow-y: hidden;
    }
}

/* ─── Публикации ──────────────────────────────────────────────────────────── */

/* Форма создания */
.post-create-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem;
}
.post-create-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}
.post-create-back:hover {
    background: rgba(235,116,27,0.1);
    color: var(--color-accent);
}
.post-create-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-sunset);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.post-create-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Загрузка фото */
.post-photos-section {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}
.post-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.post-photo-add {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.2s;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
}
.post-photo-add:hover {
    border-color: var(--color-link);
    color: var(--color-link);
    background: rgba(108,148,164,0.05);
}
.post-photo-hint {
    font-size: 0.75rem;
    opacity: 0.7;
}
.post-photo-preview {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border);
}
.post-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-photo-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.6);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.post-photo-remove:hover {
    background: rgba(239,68,68,0.8);
}

/* Текст */
.post-caption-section {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}
.post-caption-input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    resize: vertical;
    min-height: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--color-text);
    background: transparent;
    outline: none;
}
.post-caption-input::placeholder {
    color: var(--color-text-muted);
}
.post-caption-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: 0 0.25rem;
}

/* Правила */
.post-rules {
    background: rgba(108,148,164,0.06);
    border: 1px solid rgba(108,148,164,0.15);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.post-rules h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-link);
    margin-bottom: 0.75rem;
}
.post-rules ul {
    list-style: none;
    padding: 0;
}
.post-rules li {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}
.post-rules li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-link);
}

.post-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}
.post-submit-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
}

/* Сетка публикаций (профиль) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.post-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: block;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(108,148,164,0.3);
}
.post-card-image {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--color-bg), var(--color-bg-alt));
    overflow: hidden;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.post-card:hover .post-card-image img {
    transform: scale(1.05);
}
.post-card-caption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}
.post-card-reactions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 0.75rem;
}
.post-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0;
}
.post-author-avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--gradient-sunset);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
    overflow: hidden;
}
.post-author-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-author-name-sm {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}
.post-reaction-badge {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Просмотр публикации */
.post-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
}
.post-view-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.post-view-back:hover {
    color: var(--color-accent);
}

/* Автор */
.post-view-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.post-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-sunset);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    text-decoration: none;
    overflow: hidden;
}
.post-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-author-name {
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
}
.post-author-name:hover {
    color: var(--color-accent);
}
.post-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Галерея фото */
.post-images-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.post-image-slide {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
}
.post-image-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Текст */
.post-view-caption {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    white-space: pre-wrap;
}

/* Реакции */
.post-reactions-section {
    padding: 1rem 0;
}
.post-reactions-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.post-reaction-stat {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.post-reactions-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.reaction-btn {
    font-size: 1.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.reaction-btn:hover {
    border-color: var(--color-accent);
    background: rgba(244,210,130,0.1);
    transform: scale(1.1);
}

/* Реакция оставлена */
.post-reaction-done {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(244,210,130,0.06);
    border: 1px solid rgba(244,210,130,0.15);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--color-text);
}
.post-reaction-words {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Модалка слов */
.reaction-words-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.reaction-words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.reaction-word-chip {
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-bg);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--color-text);
    transition: all 0.2s;
}
.reaction-word-chip:hover {
    border-color: var(--color-link);
}
.reaction-word-chip.selected {
    background: rgba(244,210,130,0.2);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Подписка */
.btn-subscribed {
    background: rgba(244,210,130,0.1);
    border: 1.5px solid var(--color-accent);
    color: var(--color-accent);
}
.btn-subscribed:hover {
    background: rgba(244,210,130,0.2);
}

.profile-dropdown-item:hover {
    background: rgba(244,210,130,0.08);
}

/* ─── Карусель публикаций ─────────────────────────────────────────────────── */
.post-carousel {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    margin-bottom: 1rem;
}
.post-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.post-carousel-slide {
    min-width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.post-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.4);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background 0.2s;
    z-index: 2;
}
.post-carousel:hover .post-carousel-btn {
    opacity: 1;
}
.post-carousel-btn:hover {
    background: rgba(0,0,0,0.7);
}
.post-carousel-prev { left: 0.75rem; }
.post-carousel-next { right: 0.75rem; }

.post-carousel-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 2;
}
.post-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--sun-light);
    border: 1px solid;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.post-carousel-dot.active {
    background: var(--sun-glow);
    box-shadow: 0 0 6px rgba(255,255,255,0.6);
    transform: scale(1.2);
}

/* Кнопка реакции с бейджем */
.reaction-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.3rem;
    padding: 0.5rem 0.5rem;
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.reaction-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    background: rgba(244,210,130,0.1);
    transform: scale(1.05);
}
.reaction-btn:disabled {
    cursor: default;
}
.reaction-emoji {
    line-height: 1;
}
.reaction-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 18px;
    text-align: center;
}
.reaction-count.has-count {
    color: var(--color-accent);
}

/* Лента реакций */
.post-reactions-feed {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.reaction-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
}
.reaction-feed-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--gradient-sunset);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    text-decoration: none;
    overflow: hidden;
}
.reaction-feed-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reaction-feed-body {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.reaction-feed-name {
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}
.reaction-feed-name:hover {
    color: var(--color-accent);
}
.reaction-feed-emoji {
    font-size: 1.1rem;
}
.reaction-feed-words {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Поисковая строка */
.search-box {
    position: relative;
    overflow: visible;
}

.search-suggest-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    z-index: 1000;
}

.search-suggest-inner {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s;
}

.search-suggest-item:hover {
    background: var(--color-bg);
}

.search-suggest-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.search-suggest-title {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-suggest-type {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.search-suggest-all {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-accent);
    text-decoration: none;
    border-top: 1px solid var(--color-border);
}

.search-suggest-all:hover {
    background: var(--color-bg);
}

/* Страница результатов */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s;
}

.search-result-card:hover {
    background: var(--color-bg);
}

.search-result-type {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.hero, .hero-content {
    overflow: visible;
}

.listing-attrs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.listing-attr-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.listing-attr-row:last-child {
    border-bottom: none;
}

.listing-attr-name {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.listing-attr-value {
    font-weight: 500;
    font-size: 0.9rem;
}

.facet-filters-panel {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0.5rem 0;
}

.facet-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.facet-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.facet-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.facet-filter-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.desktop-only { display: inline; }
@media (max-width: 767px) {
    .desktop-only { display: none; }
}

.detail-services-block {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
}
.detail-services-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.detail-service-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
    font-size: 0.9rem;
}
.detail-service-row span:first-child {
    font-weight: 500;
    color: var(--color-text);
}
.detail-service-row span:last-child {
    color: var(--color-text-secondary);
}
.detail-services-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.my-client-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-bottom: 0.35rem;
    transition: background 0.15s;
}
.my-client-chip:hover {
    background: rgba(244,210,130,0.1);
}

/* ─── Модалка "Поделиться профилем" ──────────────────────────────────── */

.share-profile-content {
    max-width: 420px;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.share-qr-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.25rem 0;
    padding: 1rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    min-height: 260px;
}

.share-qr-wrapper canvas {
    display: block;
    max-width: 240px;
    max-height: 240px;
}

/* Настройки */
.share-qr-settings {
    margin-bottom: 1rem;
    text-align: left;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.share-qr-settings[open] {
    background: var(--color-surface);
}

.share-qr-settings-summary {
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
}

.share-qr-settings-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    border-top: 1px solid var(--color-border);
}

.qr-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.qr-setting-label {
    font-size: 0.85rem;
    color: var(--color-text);
    white-space: nowrap;
    min-width: 90px;
}

.qr-setting-row .filter-select {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

.qr-color-input {
    width: 36px;
    height: 30px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.qr-range-input {
    flex: 1;
    accent-color: var(--color-primary);
}

/* Ссылка */
.share-link-row {
    margin-bottom: 0.75rem;
}

.share-link-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.share-link-input-wrapper input {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    cursor: text;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.share-download-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem;
}