/* Elengine Modern Login/Landing UI */
.fr_welcome {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}
body.night-mode .fr_welcome {
    background-color: #0f1112;
}

/* Left Hero Section */
.fr_welcome_hero {
    /* Обновленный градиент */
    background: radial-gradient(circle at 30% 30%, #0c1840 0%, #1c0e35 50%, #4a1c5e 100%);
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    flex: 1 1 auto;
}

/* Контейнер для анимации */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.6;
}

.fr_welcome_hero_content {
    max-width: 680px;
    margin-right: 0;
    padding-left: clamp(24px, 6vw, 86px) !important;
    padding-right: clamp(24px, 4vw, 48px) !important;
    text-align: left !important;
    position: relative;
    z-index: 2; /* Текст поверх анимации */
}
.fr_welcome_desc {
    max-width: 540px;
}
.hero-logo {
    max-width: 220px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.logo-wrapper img.logo-light {
    display: inline-block;
}

body.night-mode .logo-wrapper img.logo-light {
    display: none;
}

.logo-wrapper img.logo-dark {
    display: none;
}

body.night-mode .logo-wrapper img.logo-dark {
    display: inline-block;
}

@media (min-width: 1200px) {
    .main-header .logo-wrapper .logo-pattern {
        display: none !important;
    }
}

@media (max-width: 1199px) {
    .main-header .logo-wrapper .logo-wordmark {
        display: none !important;
    }

    .main-header .ele_header,
    .main-header .ele_navbar_top > .container-fluid {
        overflow: visible;
    }

    .main-header .logo-wrapper {
        overflow: visible !important;
        display: flex;
        align-items: center;
    }

    .main-header .logo-wrapper .logo-pattern {
        display: block;
        max-height: 30px;
        max-width: 34px;
        width: 34px;
        height: 30px;
        margin-left: 0;
        object-fit: contain;
        object-position: 44% center;
        flex-shrink: 0;
    }
}

.main-header .logo-wrapper,
.ele_welcome_top .logo-wrapper {
    overflow: visible !important;
}

.main-header .logo-wrapper img,
.ele_welcome_top .logo-wrapper img {
    max-width: 200px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Right Auth Section */
.fr_welcome_form_col {
    width: 42%;
    min-width: 460px;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #ffffff;
    box-shadow: inset 1px 0 0 #e9ecef;
    z-index: 10;
}
body.night-mode .fr_welcome_form_col {
    background-color: #1a1c1d;
    box-shadow: inset 1px 0 0 #2a2c2d;
}

.fr_welcome_sign {
    max-width: 480px;
    width: 100%;
    padding: 22px 18px;
}

.fr_welcome_title {
    font-family: 'Gilroy', Roboto, sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    color: #212529;
}
body.night-mode .fr_welcome_title {
    color: #f8f9fa;
}

/* Social Buttons */
.fr_welcome_social .btn {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    background-color: #fff;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}
.fr_welcome_social .btn:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
body.night-mode .fr_welcome_social .btn {
    background-color: #2a2c2d;
    border-color: #323637;
    color: #e9ecef;
}
body.night-mode .fr_welcome_social .btn:hover {
    background-color: #323637;
}

/* Form Fields */
.fr_welcome_field {
    position: relative;
    margin-bottom: 20px;
}
.fr_welcome_field input, 
.fr_welcome_field select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    background-color: #f8f9fa;
    padding: 14px 16px 14px 50px;
    font-size: 15px;
    width: 100%;
    height: 56px;
    display: block;
    margin: 0;
    transition: all 0.2s ease-in-out;
    outline: none;
    color: #495057;
}
.fr_welcome_field input::placeholder {
    color: #adb5bd;
}
.fr_welcome_field input:focus, 
.fr_welcome_field select:focus {
    border-color: var(--main-btn, #2563EB);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--main-btn-rgb, 37, 99, 235), 0.1);
}
body.night-mode .fr_welcome_field input, 
body.night-mode .fr_welcome_field select {
    border-color: #2a2c2d;
    background-color: #2a2c2d;
    color: #f8f9fa;
}
body.night-mode .fr_welcome_field input::placeholder {
    color: #6c757d;
}
body.night-mode .fr_welcome_field input:focus, 
body.night-mode .fr_welcome_field select:focus {
    border-color: var(--main-btn, #163672);
    background-color: #1a1c1d;
    box-shadow: 0 0 0 4px rgba(var(--main-btn-rgb, 22, 54, 114), 0.2);
}

/* Field Icons */
.fr_welcome_field svg {
    top: 50%;
    transform: translateY(-50%);
    left: 16px;
    color: #adb5bd;
    pointer-events: none;
    transition: color 0.2s ease-in-out;
    width: 22px;
    height: 22px;
}
.fr_welcome_field input:focus + svg, 
.fr_welcome_field select:focus + svg {
    color: var(--main-btn, #2563EB);
}
body.night-mode .fr_welcome_field svg {
    color: #6c757d;
}

/* Buttons */
.fr_welcome_btn {
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 24px;
    border: 0;
    background: var(--nova-btn-gradient);
    background-color: var(--main-btn);
    box-shadow: 0 4px 12px rgba(var(--main-btn-rgb, 37, 99, 235), 0.3);
    transition: all 0.2s ease;
}
.fr_welcome_btn:hover {
    transform: translateY(-2px);
    background: var(--nova-btn-gradient-hover);
    background-color: var(--main-btn-hover);
    box-shadow: 0 6px 16px rgba(var(--main-btn-rgb, 37, 99, 235), 0.4);
}

.fr_welcome_switch {
    font-weight: 500;
    color: #6c757d;
}
.fr_welcome_switch a {
    font-weight: 700;
    text-decoration: none;
    color: var(--main-btn, #2563EB);
    transition: color 0.2s ease;
}
.fr_welcome_switch a:hover {
    color: var(--main-btn-hover, #1D4ED8);
    text-decoration: underline;
}

/* Checkboxes */
.form-check-label {
    cursor: pointer;
    font-size: 14.5px;
    color: #495057;
}
body.night-mode .form-check-label {
    color: #ced4da;
}

/* Footer Links */
.fr_welcome_bottom a {
    color: #6c757d;
    font-size: 13.5px;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s ease;
}
.fr_welcome_bottom a:hover {
    color: var(--main-btn, #2563EB);
}
body.night-mode .fr_welcome_bottom a {
    color: #adb5bd;
}

/* Responsive */
@media (min-width: 992px) {
    .fr_welcome_hero {
        position: relative;
        width: 58%;
        height: 100vh;
        height: 100dvh;
    }
    .fr_welcome_form_col {
        position: relative;
        margin-left: auto;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .fr_welcome_mid {
        min-height: 0;
    }
    .fr_welcome_hero_content h2 {
        font-size: clamp(2rem, 2.8vw, 2.8rem);
        line-height: 1.2;
    }
}

@media (max-width: 991px) {
    .fr_welcome {
        flex-direction: column;
        overflow-y: auto;
        height: auto !important;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .fr_welcome_hero {
        position: relative;
        width: 100%;
        min-height: 42vh;
        padding-bottom: 62px;
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding-top: 32px;
    }
    .fr_welcome_hero_content {
        margin-right: 0;
        text-align: center !important;
        max-width: 100%;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
    .fr_welcome_form_col {
        width: 100%;
        min-width: 0;
        min-height: auto;
        background-color: transparent;
        box-shadow: none;
        margin-top: -42px;
        z-index: 20;
        flex-grow: 1;
        padding-bottom: 16px;
    }
    body.night-mode .fr_welcome_form_col {
        background-color: transparent;
    }
    .fr_welcome_sign {
        background-color: #ffffff;
        padding: 24px 16px !important;
        border-radius: 24px;
        box-shadow: 0 15px 50px rgba(0,0,0,0.1);
        margin: 0 auto !important;
        width: calc(100% - 24px) !important;
        max-width: 480px;
    }
    body.night-mode .fr_welcome_sign {
        background-color: #1a1c1d;
        box-shadow: 0 15px 50px rgba(0,0,0,0.4);
    }
    .hero-logo {
        max-width: 140px;
    }
    .hero-logo-wrapper h1 {
        font-size: 2.1rem;
    }
    .fr_welcome_hero_content h2 {
        font-size: 1.55rem;
        margin-bottom: 8px !important;
    }
    .fr_welcome_hero_content p {
        font-size: 0.96rem;
        color: rgba(255, 255, 255, 0.86) !important;
        margin-left: auto;
        margin-right: auto;
    }
    .fr_welcome_bottom {
        padding-top: 18px !important;
    }
}

/* Global rounded UI */
:root {
    --ele-radius-sm: 10px;
    --ele-radius-md: 12px;
    --ele-radius-lg: 16px;
    --ele-radius-xl: 20px;
    --ele-radius-pill: 999px;

    /* Nova logo palette */
    --nova-cyan: #22D3EE;
    --nova-blue: #2563EB;
    --nova-blue-hover: #1D4ED8;
    --nova-blue-mid: #3B82F6;
    --nova-sky: #38BDF8;
    --nova-navy: #102A5C;
    --nova-navy-deep: #081528;
    --nova-navy-light: #0F3347;
    --main-link: #2563EB;
    --main-btn: #2563EB;
    --main-btn-hover: #1D4ED8;
    --main-btn-rgb: 37, 99, 235;
    --plyr-color-main: #2563EB;
    --nova-btn-gradient: linear-gradient(135deg, #22D3EE 0%, #2563EB 100%);
    --nova-btn-gradient-hover: linear-gradient(135deg, #06B6D4 0%, #1D4ED8 100%);
    --ele-nav-icon: #2563EB;
    --ele-nav-icon-active: #1D4ED8;
    --ele-nav-icon-bg-hover: rgba(37, 99, 235, 0.1);
    --ele-nav-icon-bg-active: rgba(37, 99, 235, 0.14);

    /* Unified gray surfaces */
    --ele-gray-page: #e8eaed;
    --ele-gray-surface: #ffffff;
    --ele-gray-border: #dcdfe3;
    --ele-gray-input: #e2e4e8;
    --ele-gray-input-focus: #d8dce1;
    --body-bg: #e8eaed;
    --header-background: #ffffff;
    --header-search-bg: rgba(0, 0, 0, 0.06);
}

body:not(.night-mode) {
    background-color: var(--ele-gray-page) !important;
}

body.night-mode {
    --ele-gray-page: #121212;
    --ele-gray-surface: #222222;
    --ele-gray-border: #333333;
    --ele-gray-input: #2a2a2a;
    --ele-gray-input-focus: #333333;
    --body-bg-color-dark: #121212;
    --header-background: #222222;
    --header-background-dark: #222222;
    --header-search-bg: rgba(255, 255, 255, 0.08);
    --main-btn: #163672;
    --main-btn-hover: #1a3f82;
    --main-btn-rgb: 22, 54, 114;
    --plyr-color-main: #163672;
    --nova-btn-gradient: linear-gradient(135deg, #0F3347 0%, #163672 55%, #0a1830 100%);
    --nova-btn-gradient-hover: linear-gradient(135deg, #143f58 0%, #1a4088 55%, #0c2040 100%);
    --ele-nav-icon: #38BDF8;
    --ele-nav-icon-active: #22D3EE;
    --ele-nav-icon-bg-hover: rgba(56, 189, 248, 0.12);
    --ele-nav-icon-bg-active: rgba(56, 189, 248, 0.18);
}

/* Cards & panels */
.ele_content {
    border-radius: var(--ele-radius-lg) !important;
    box-shadow: none !important;
    border: 1px solid var(--ele-gray-border) !important;
    background-color: var(--ele-gray-surface) !important;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.ele_content:hover {
    box-shadow: none !important;
}

body.night-mode .ele_content {
    background-color: var(--ele-gray-surface) !important;
    border-color: var(--ele-gray-border) !important;
    box-shadow: none !important;
}
body.night-mode .ele_content:hover {
    box-shadow: none !important;
}

.card {
    border-radius: var(--ele-radius-lg) !important;
}

.ele_navbar_top {
    background-color: var(--ele-gray-surface) !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--ele-gray-border) !important;
}

body.night-mode .ele_navbar_top {
    background-color: var(--ele-gray-surface) !important;
    border-bottom: 1px solid var(--ele-gray-border) !important;
    box-shadow: none !important;
}

/* Header search — gray, no blue focus */
.main-header .search-wrapper .form-control {
    background: var(--header-search-bg) !important;
    border: 0 !important;
    box-shadow: none !important;
}

.main-header .search-wrapper .form-control:focus {
    background: var(--ele-gray-input-focus) !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.night-mode .main-header .search-wrapper .form-control {
    background: var(--header-search-bg) !important;
    color: var(--header-bg-color-dark);
}

body.night-mode .main-header .search-wrapper .form-control:focus {
    background: var(--ele-gray-input-focus) !important;
    box-shadow: none !important;
}

/* Header buttons — no default bg, highlight on hover */
.main-header .ele_hdr_droptoggle,
.main-header .ele_hdr_droptoggle.btn-light,
.main-header .ele_toggle_sidebar,
.main-header .ele_toggle_online,
.main-header .ele_toggle_search {
    background: transparent !important;
    box-shadow: none !important;
    border: 0;
    transition: background-color 0.15s ease;
}

.main-header .ele_hdr_droptoggle:before {
    opacity: 0 !important;
}

.main-header .ele_hdr_droptoggle:hover,
.main-header .ele_toggle_sidebar:hover,
.main-header .ele_toggle_online:hover,
.main-header .ele_toggle_search:hover,
.main-header .ele_hdr_user_droptoggle:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}

body.night-mode .main-header .ele_hdr_droptoggle:hover,
body.night-mode .main-header .ele_toggle_sidebar:hover,
body.night-mode .main-header .ele_toggle_online:hover,
body.night-mode .main-header .ele_toggle_search:hover,
body.night-mode .main-header .ele_hdr_user_droptoggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.main-header .show > .ele_hdr_droptoggle,
.main-header .dropdown.show > .ele_hdr_droptoggle {
    background: rgba(0, 0, 0, 0.08) !important;
    color: var(--header-color) !important;
}

body.night-mode .main-header .show > .ele_hdr_droptoggle,
body.night-mode .main-header .dropdown.show > .ele_hdr_droptoggle {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--header-bg-color-dark) !important;
}

/* User menu toggle — avatar + chevron, rectangular hover */
.main-header .ele_hdr_user_droptoggle {
    padding: 4px 2px 4px 4px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center;
    line-height: 1;
}

.main-header .ele_hdr_user_droptoggle,
.main-header .ele_hdr_user_droptoggle:before {
    border-radius: 10px !important;
}

.main-header .ele_hdr_user_toggle_inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-header .ele_hdr_user_droptoggle img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.main-header .ele_hdr_user_chevron {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    opacity: 0.55;
    margin-right: 0;
}

body.night-mode .main-header .ele_hdr_user_chevron {
    opacity: 0.7;
}

.main-header .ele_hdr_user_droptoggle > span:not(.ele_hdr_user_toggle_inner) {
    display: none !important;
}

/* Left sidebar nav — Nova brand icon colors (not header) */
.ele_sidebar_left .sidebar_innr > .btn svg {
    color: var(--ele-nav-icon);
}

.ele_sidebar_left .sidebar_innr > .btn:hover svg {
    color: var(--ele-nav-icon-active);
    opacity: 1;
}

.ele_sidebar_left .sidebar_innr > .btn.active {
    color: var(--ele-nav-icon-active) !important;
}

.ele_sidebar_left .sidebar_innr > .btn.active svg {
    color: var(--ele-nav-icon-active);
    opacity: 1;
}

body:not(.night-mode) .ele_sidebar_left .sidebar_innr > .btn.active:before {
    opacity: 0.12;
}

body.night-mode .ele_sidebar_left .sidebar_innr > .btn.active:before {
    opacity: 0.16;
}

/* Feed posts */
.js_posts_stream > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.js_posts_stream > ul > li {
    margin-bottom: 16px;
}
.ele_pinned_post {
    margin-bottom: 16px;
}
.post,
.ele_post_skel {
    border-radius: var(--ele-radius-lg) !important;
    overflow: visible;
    box-shadow: none;
    border: 1px solid var(--ele-gray-border);
    background-color: var(--ele-gray-surface) !important;
    margin-bottom: 0;
}
.post .post-media,
.post .post-media-image,
.post .post-media-image .image,
.post .pg_wrapper a {
    overflow: hidden;
}
.post.boosted,
.post.highlighted {
    border-radius: var(--ele-radius-lg) !important;
}
.post.is_hidden {
    border-radius: var(--ele-radius-md) !important;
}

body.night-mode .post,
body.night-mode .ele_post_skel {
    background-color: var(--ele-gray-surface) !important;
    border-color: var(--ele-gray-border);
    box-shadow: none;
}

/* Publisher */
.ele_content.publisher,
.ele_publisher {
    border-radius: var(--ele-radius-lg) !important;
}
.ele_content.publisher {
    padding: 0 !important;
    border: 1px solid var(--ele-gray-border) !important;
}
body.night-mode .ele_content.publisher {
    border-color: var(--ele-gray-border) !important;
}
.publisher.mini {
    border-radius: var(--ele-radius-lg) !important;
}
.publisher-tools-tab:not(.disabled):hover,
.publisher-anonymous-lable,
.ele_pub_btn_hasat {
    border-radius: var(--ele-radius-md) !important;
}
.publisher-custom-thumbnail .x-image {
    border-radius: var(--ele-radius-md) !important;
}

/* Photo & emoji insert icons — navbar-style accent */
.publisher-emojis svg,
.publisher-emojis .js_emoji-menu-toggle svg,
.publisher-tools-tab[data-tab="photos"] svg,
.publisher-tools-tab[data-tab="album"] svg,
.post-form .x-form-tools-attach,
.post-form .x-form-tools-emoji,
.comment-form .x-form-tools-attach,
.comment-form .x-form-tools-emoji {
    color: var(--ele-nav-icon) !important;
}

.publisher-emojis:hover svg,
.publisher-emojis .js_emoji-menu-toggle:hover svg,
.publisher-tools-tab[data-tab="photos"]:not(.disabled):hover svg,
.publisher-tools-tab[data-tab="album"]:not(.disabled):hover svg,
.publisher-tools-tab[data-tab="photos"].activated svg,
.publisher-tools-tab[data-tab="album"].activated svg,
.post-form .x-form-tools-attach:hover,
.post-form .x-form-tools-emoji:hover,
.comment-form .x-form-tools-attach:hover,
.comment-form .x-form-tools-emoji:hover {
    color: var(--ele-nav-icon-active) !important;
}

body.night-mode .publisher-emojis svg,
body.night-mode .publisher-tools-tab[data-tab="photos"] svg,
body.night-mode .publisher-tools-tab[data-tab="album"] svg,
body.night-mode .post-form .x-form-tools-attach,
body.night-mode .post-form .x-form-tools-emoji,
body.night-mode .comment-form .x-form-tools-attach,
body.night-mode .comment-form .x-form-tools-emoji {
    color: var(--ele-nav-icon) !important;
}

/* Buttons */
.btn:not(.btn-rounded):not(.rounded-circle):not(.rounded-0),
.btn-mat:not(.btn-rounded):not(.rounded-circle):not(.rounded-0),
.btn-social,
.btn-voice-clear,
.btn-voice-stop .js_voice-timer {
    border-radius: var(--ele-radius-md) !important;
    font-weight: 600;
}
.btn-sm:not(.btn-rounded):not(.rounded-circle) {
    border-radius: var(--ele-radius-sm) !important;
}
.btn-icon-social {
    border-radius: 50% !important;
}

/* Nova brand primary buttons */
.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
    background: var(--nova-btn-gradient);
    background-color: var(--main-btn);
    border-color: transparent;
    color: #fff;
}

.btn-primary:hover,
.btn-primary.focus,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.btn-primary:not(:disabled):not(.disabled):active:focus {
    background: var(--nova-btn-gradient-hover);
    background-color: var(--main-btn-hover);
    border-color: transparent;
    color: #fff;
}

.btn-outline-primary,
.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
    color: var(--main-btn);
    border-color: var(--main-btn);
    background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary.focus,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.show > .btn-outline-primary.dropdown-toggle {
    color: #fff;
    border-color: transparent;
    background: var(--nova-btn-gradient);
    background-color: var(--main-btn);
}

.btn-outline-primary.focus,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 3px rgba(var(--main-btn-rgb), 0.25);
}

/* Inputs */
.form-control,
.input-group-text,
.custom-select {
    border-radius: var(--ele-radius-md) !important;
    padding: 12px 16px;
    box-shadow: none !important;
}
.form-control:focus {
    border-color: #b0b5bc;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important;
}
body.night-mode .form-control:focus {
    border-color: #4a4e52;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06) !important;
}
body.night-mode .form-control {
    background-color: #2a2c2d;
    border-color: #323637;
    color: #e9ecef;
}

select.form-control {
    line-height: 1.45 !important;
    min-height: 48px;
    height: auto !important;
}

/* ele_field selects — fix clipped text with rounded corners */
.ele_field > select {
    border-radius: var(--ele-radius-md) !important;
    border: 1px solid var(--ele-gray-border) !important;
    border-bottom: 1px solid var(--ele-gray-border) !important;
    padding: 24px 36px 10px 16px !important;
    height: auto !important;
    min-height: 56px;
    line-height: 1.45;
    box-sizing: border-box;
    background-color: var(--ele-gray-input) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

body.night-mode .ele_field > select {
    background-color: var(--ele-gray-input) !important;
    border-color: var(--ele-gray-border) !important;
    color: rgb(255 255 255 / 87%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ele_field > select:hover {
    background-color: var(--ele-gray-input-focus) !important;
    border-color: var(--ele-gray-border) !important;
}

.ele_field > select:focus {
    border-color: #b0b5bc !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important;
    outline: none;
}

body.night-mode .ele_field > select:focus {
    border-color: #4a4e52 !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06) !important;
}

.ele_field > select + span {
    bottom: auto;
    height: auto;
    right: 36px;
    overflow: visible;
    padding-top: 8px;
}

.ele_field > select + span::after {
    display: none;
}

.ele_field > select:focus + span {
    color: var(--main-btn);
}

/* Dropdowns, alerts, modals */
.dropdown-menu {
    border-radius: var(--ele-radius-md) !important;
    overflow: hidden;
}
.alert:not(.rounded-0),
.alert-post,
.see-more.alert {
    border-radius: var(--ele-radius-md) !important;
}
.modal-content:not(.ele_wm_box .modal-content) {
    border-radius: var(--ele-radius-lg) !important;
    overflow: hidden;
}
.popover,
.tooltip-inner {
    border-radius: var(--ele-radius-sm) !important;
}

/* Feed media & snippets */
.post-media,
.post-snippet,
.post-top-alert > div,
.post-text-translation,
.post-downloader,
.post-funding-meta .funding-completion,
.post-funding-meta .post-media-image .image,
.post-job-meta .post-media-image .image,
.post-downloader .icon,
.embed-iframe-wrapper,
.post-colored-preview {
    border-radius: var(--ele-radius-md) !important;
}
.post-gif-link .post-media,
.post-snippet .post-media,
.post-snippet .post-site-link .post-media-image .image,
.post-gif-link .post-media .post-media-image .image {
    border-radius: var(--ele-radius-md) !important;
}
.post-media {
    overflow: hidden;
}
.post-media-image .source {
    border-radius: var(--ele-radius-sm) !important;
}
.pg_wrapper a {
    border-radius: var(--ele-radius-sm);
    overflow: hidden;
}

/* Feed photos — natural aspect ratio, capped at theme max (680px height) */
.pg_1x > a {
    width: auto;
    height: auto;
    max-width: 100%;
    display: inline-block;
    vertical-align: top;
    background-color: transparent;
}

.post .pg_wrapper .pg_1x img,
.post .pg_1x .ele-img-loader-host > img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 680px;
    min-width: 0;
    min-height: 0;
    display: block;
    object-fit: contain;
}

/* Link/media previews — natural aspect ratio, capped at 350px height */
a.post-media-image > img,
.post-media-image > img,
.post-gif-link .post-media-image > img,
.post-media img.img-fluid {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 350px;
    min-width: 0;
    min-height: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

.post-site-link a.post-media-image,
.post-gif-link .post-media-image {
    text-align: center;
}

/* Comments */
.post-footer .post-comments {
    padding-top: 8px;
}
.post .js_comments.pt10 {
    padding-top: 6px !important;
}
.post-comments .comments-filter {
    margin-bottom: 8px;
}
.post-comments .comment {
    padding-bottom: 2px;
}
.post-comments .comment.js_comment-form {
    padding-bottom: 10px;
}
.post-comments .comment-replies {
    padding-top: 6px;
}
.post-comments .view-more-replies {
    margin-top: 2px;
}
.comment-form,
.comment-attachments,
.comment-voice-notes {
    border-radius: var(--ele-radius-xl) !important;
}
.comment-avatar-picture {
    border-radius: var(--ele-radius-sm) !important;
}

/* Stories & filters */
.ele_post_filters_nav > .filterby,
.ele_switch_tabs,
.ele_toggle_tabs,
.section-title,
.page_divider,
.attachments li,
.attachments li.add,
.ui-box,
.stat-panel,
.story_empty p {
    border-radius: var(--ele-radius-md) !important;
}
.ele_switch_tabs > div > a.active,
.ele_toggle_tabs > a.active {
    border-radius: var(--ele-radius-pill) !important;
}

/* Sidebars */
.sidebar.rightcol .ele_content {
    padding: 12px !important;
}

.sidebar.rightcol .ele_content.p-0 {
    padding: 0 !important;
}

.sidebar.rightcol .ele_sidebar_widget_title {
    padding: 10px 12px;
}

.ele_sidebar_widget_title + .ele_htag {
    padding-top: 8px;
}

/* Group/page content tabs — same as profile nav */
.ele_node_tabs {
    overflow: hidden;
}
.ele_node_tabs .ele_user_profile_nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}
.ele_node_tabs .alert {
    margin: 12px 12px 0;
}

/* See All links — subtle text, not accent buttons */
.ele_sidebar_widget_title a.bold,
.ele_sidebar_widget_title > a:not(.btn),
.dropdown-widget-footer,
body:not(.n_chat) .ele_messenger_footer {
    color: #666 !important;
    font-weight: 500;
    text-decoration: none;
}

.ele_sidebar_widget_title a.bold:hover,
.ele_sidebar_widget_title > a:not(.btn):hover,
.dropdown-widget-footer:hover,
body:not(.n_chat) .ele_messenger_footer:hover {
    color: #333 !important;
    text-decoration: none;
    opacity: 1;
}

.dropdown-widget-footer {
    display: block;
    padding: 7px 12px;
    text-align: center;
    font-size: 13px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04) !important;
    margin: 8px 0;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.dropdown-widget-footer:hover {
    background: rgba(0, 0, 0, 0.07) !important;
}

body.night-mode .ele_sidebar_widget_title a.bold,
body.night-mode .ele_sidebar_widget_title > a:not(.btn),
body.night-mode .dropdown-widget-footer,
body.night-mode:not(.n_chat) .ele_messenger_footer {
    color: #aaa !important;
}

body.night-mode .ele_sidebar_widget_title a.bold:hover,
body.night-mode .ele_sidebar_widget_title > a:not(.btn):hover,
body.night-mode .dropdown-widget-footer:hover,
body.night-mode:not(.n_chat) .ele_messenger_footer:hover {
    color: #ddd !important;
}

body.night-mode .dropdown-widget-footer {
    background: rgba(255, 255, 255, 0.06) !important;
}

body.night-mode .dropdown-widget-footer:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Subscribe — quiet secondary action */
.ele_side_users .data-content .btn.js_like-page,
.ele_side_users .data-content .btn.js_unlike-page,
.profile-buttons-wrapper .btn.js_like-page,
.profile-buttons-wrapper .btn.js_unlike-page,
.ele_my_pages .btn.js_like-page,
.ele_my_pages .btn.js_unlike-page,
.ui-box .btn.js_like-page,
.ui-box .btn.js_unlike-page {
    color: #555 !important;
    background: rgba(0, 0, 0, 0.03) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12) !important;
    border: 0 !important;
    font-weight: 500;
}

.ele_side_users .data-content .btn.js_like-page:hover,
.ele_side_users .data-content .btn.js_unlike-page:hover,
.profile-buttons-wrapper .btn.js_like-page:hover,
.profile-buttons-wrapper .btn.js_unlike-page:hover,
.ele_my_pages .btn.js_like-page:hover,
.ele_my_pages .btn.js_unlike-page:hover,
.ui-box .btn.js_like-page:hover,
.ui-box .btn.js_unlike-page:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #333 !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18) !important;
}

body.night-mode .ele_side_users .data-content .btn.js_like-page,
body.night-mode .ele_side_users .data-content .btn.js_unlike-page,
body.night-mode .profile-buttons-wrapper .btn.js_like-page,
body.night-mode .profile-buttons-wrapper .btn.js_unlike-page,
body.night-mode .ele_my_pages .btn.js_like-page,
body.night-mode .ele_my_pages .btn.js_unlike-page,
body.night-mode .ui-box .btn.js_like-page,
body.night-mode .ui-box .btn.js_unlike-page {
    color: #bbb !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
}

body.night-mode .ele_side_users .data-content .btn.js_like-page:hover,
body.night-mode .ele_side_users .data-content .btn.js_unlike-page:hover,
body.night-mode .profile-buttons-wrapper .btn.js_like-page:hover,
body.night-mode .profile-buttons-wrapper .btn.js_unlike-page:hover,
body.night-mode .ele_my_pages .btn.js_like-page:hover,
body.night-mode .ele_my_pages .btn.js_unlike-page:hover,
body.night-mode .ui-box .btn.js_like-page:hover,
body.night-mode .ui-box .btn.js_unlike-page:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #e4e4e4 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18) !important;
}

/* Misc UI blocks */
.bs-callout,
.tags li,
.emoji-menu .item:hover,
.ele_post_job_info,
.post-custom-fileds-wrapper,
.poll-option .ele_post_as_anon label {
    border-radius: var(--ele-radius-md) !important;
}

/* Post actions — flat icon + count (no button backgrounds) */
.post-actions {
    padding: 2px 15px 12px;
    margin-top: 12px;
    gap: 12px;
}
.post-actions > .valign:first-child {
    flex: 0 1 auto;
    gap: 10px;
    align-items: center;
}
.post-actions > .valign:last-child {
    gap: 12px;
    flex: 0 0 auto;
    margin-left: auto;
}
.post-actions .post-reactions-like-group {
    gap: 2px;
    align-items: center;
    flex: 0 0 auto;
}
.post-actions .post-reactions-summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    margin-left: 2px;
    cursor: pointer;
}
.post-actions .post-reactions-count {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    line-height: 1;
    flex-shrink: 0;
}
body.night-mode .post-actions .post-reactions-count {
    color: #a8b0bc;
}
.post-actions .post-reactions-summary:hover {
    opacity: 0.72;
}
.post-actions .post-reactions-like-icon svg {
    display: block;
}
.post-actions .post-reactions-like-icon.is-active svg {
    color: #ef4444;
}
/* override global .emoji (120px + top:-76%) so icon stays in the action row */
.post-actions .reaction-btn .reaction-btn-icon.post-reactions-like-icon.is-emoji,
.post-actions .reaction-btn .reaction-btn-icon.post-reactions-like-icon.is-emoji .inline-emoji {
    position: relative;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    vertical-align: middle;
}
.post-actions .post-reactions-like-icon.is-emoji .inline-emoji .emoji {
    position: relative !important;
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 0;
}
.post-actions .post-reactions-like-icon.is-emoji .inline-emoji .emoji img {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    display: block;
}
.post-actions .reactions-stats {
    margin: 0;
    transform: scale(0.65);
    transform-origin: left center;
    opacity: 0.68;
    filter: saturate(0.8);
    flex-shrink: 0;
}
.post-actions .reactions-stats .inline-emoji {
    width: 18px;
    height: 18px;
    overflow: hidden;
    display: inline-block;
    line-height: 0;
}
.post-actions .reactions-stats .inline-emoji .emoji {
    position: relative !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 0;
}
.post-actions .reactions-stats .inline-emoji .emoji img {
    width: 18px !important;
    height: 18px !important;
    display: block;
}
.post-actions .reactions-stats > .reactions-stats-item {
    background: transparent !important;
    padding: 0;
    margin-left: -5px !important;
    overflow: hidden;
}
.post-actions .reactions-stats > .reactions-stats-item:nth-child(1) {
    margin-left: 0 !important;
}
body.night-mode .post-actions .reactions-stats {
    opacity: 0.62;
    filter: saturate(0.75);
}
body.night-mode .post-actions .reactions-stats > .reactions-stats-item {
    background: transparent !important;
}
.post-actions .action-btn {
    margin: 0;
}
.post-actions .reaction-btn {
    flex: 0 0 auto;
    align-self: center;
    justify-content: flex-start;
}
.post-actions .action-btn .stat-ico-bg,
.post-actions .reaction-btn .reaction-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 2px 0;
    margin: 0;
    border-radius: 0 !important;
    background-color: transparent !important;
    vertical-align: middle;
}
.post-actions .stat-ico-bg svg,
.post-actions .reaction-btn-icon svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #6b7280;
}
.post-actions .stat-ico-bg span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #9ca3af;
}
body.night-mode .post-actions .stat-ico-bg svg {
    color: #9ca3af;
}
body.night-mode .post-actions .stat-ico-bg span {
    color: #a8b0bc;
}
.post-actions .action-btn:hover .stat-ico-bg,
.post-actions .reaction-btn:hover .reaction-btn-icon,
.post-actions:hover .action-btn:hover .stat-ico-bg:hover,
.post-actions:hover .reaction-btn:hover .reaction-btn-icon:hover {
    background-color: transparent !important;
    opacity: 0.72;
}
body.night-mode .post-actions .action-btn .stat-ico-bg,
body.night-mode .post-actions .reaction-btn .reaction-btn-icon,
body.night-mode .post-actions:hover .action-btn:hover .stat-ico-bg:hover,
body.night-mode .post-actions:hover .reaction-btn:hover .reaction-btn-icon:hover {
    background-color: transparent !important;
}
.post-actions .reactions-wrapper {
    flex: 0 0 auto;
    position: relative;
    z-index: 3;
    overflow: visible;
}
.post-actions {
    overflow: visible;
    position: relative;
    z-index: 2;
}
.post .reactions-container {
    z-index: 1080 !important;
    border-radius: 28px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 2px rgba(0, 0, 0, 0.06) !important;
}
body.night-mode .post .reactions-container {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), 0 0 2px rgba(255, 255, 255, 0.08) !important;
}
@media (max-width: 969px) {
    .post .reactions-container {
        position: absolute !important;
        bottom: calc(100% + 6px) !important;
        top: auto !important;
        left: 0 !important;
        right: auto !important;
        width: auto !important;
    }
}

/* --- Centered app shell (desktop) --- */
@media (min-width: 1200px) {
    body:has(.ele_sidebar_left) {
        --ele-sidebar-w: 250px;
        --ele-feed-max-w: 1050px;
        --ele-feed-w: min(var(--ele-feed-max-w), calc(100vw - 48px - var(--ele-sidebar-w)));
        --ele-shell-w: calc(var(--ele-sidebar-w) + var(--ele-feed-w));
        --ele-shell-gutter: max(24px, calc((100vw - var(--ele-shell-w)) / 2));
        --ele-content-inset: 15px;
        --ele-content-col: 0.64;
    }

    body:has(.ele_sidebar_left) .ele_sidebar_left {
        left: var(--ele-shell-gutter);
        width: var(--ele-sidebar-w);
    }

    .ele_sidebar_left .ele_prem,
    .ele_sidebar_left .sidebar_innr > .btn span {
        display: inline;
    }

    .ele_sidebar_left .sidebar_innr > .btn {
        min-height: 48px;
        min-width: auto;
        padding: 0 16px;
        justify-content: flex-start;
    }

    .ele_sidebar_left .sidebar_innr > .btn svg,
    .ele_sidebar_left .sidebar_innr > .btn img {
        margin: 0;
        width: 24px;
        height: 24px;
    }

    .ele_sidebar_left .sidebar_innr {
        padding: 16px 12px;
    }

    .hide_side_ttip {
        display: none !important;
    }

    body:has(.ele_sidebar_left) .main-wrapper {
        padding-left: 0;
        padding-right: 0;
        width: var(--ele-feed-w);
        max-width: var(--ele-feed-w);
        margin-left: calc(var(--ele-shell-gutter) + var(--ele-sidebar-w));
        margin-right: var(--ele-shell-gutter);
    }

    body:has(.ele_sidebar_left) .container {
        max-width: 100%;
        width: 100%;
    }

    body:has(.ele_sidebar_left) .main-header .ele_navbar_top > .container-fluid {
        max-width: var(--ele-shell-w);
        margin-left: auto;
        margin-right: auto;
        padding-left: 16px;
        padding-right: 16px;
    }

    body:has(.ele_sidebar_left) .ele_navbar_top_right {
        right: calc(var(--ele-shell-gutter) + 10px);
        padding: 8px 0;
    }

    body:has(.ele_sidebar_left) .top-bar {
        padding-left: calc(var(--ele-shell-gutter) + var(--ele-sidebar-w));
        padding-right: var(--ele-shell-gutter);
    }

    body:has(.ele_sidebar_left) .main-header .search-wrapper {
        position: absolute;
        top: 10px;
        left: calc(var(--ele-shell-gutter) + var(--ele-sidebar-w) + var(--ele-content-inset));
        width: min(280px, calc((var(--ele-feed-w) - var(--ele-content-inset) * 2) * var(--ele-content-col)));
        max-width: none;
        margin: 0;
    }

    body:has(.ele_sidebar_left) .main-header .ele_header > .logo-wrapper {
        left: var(--ele-shell-gutter);
        width: var(--ele-sidebar-w);
        justify-content: flex-start;
        padding: 0 16px;
    }

}

@media (min-width: 1200px) {
    body:not(.n_chat) .main-wrapper,
    body:not(.n_chat) .top-bar {
        padding-right: 0;
    }
}

/* Desktop header search: compact + aligned with feed column */
@media (min-width: 993px) {
    .main-header .ele_header > .logo-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: auto;
        min-width: 70px;
        max-width: var(--ele-sidebar-w, 250px);
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        z-index: 1046;
        flex: none;
        margin: 0;
        padding: 0 12px 0 12px;
        overflow: visible;
    }

    .main-header .logo-wrapper img {
        max-width: calc(var(--ele-sidebar-w, 250px) - 24px);
        max-height: 30px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .main-header .search-wrapper {
        width: 280px;
        margin: 0;
        flex: 0 1 auto;
    }

    .main-header .search-wrapper > form {
        margin: 0;
    }

    .main-header .search-wrapper .form-control {
        height: 36px;
        padding: 6px 12px 6px 36px;
        font-size: 14px;
        border-radius: 999px;
    }

    .main-header .search-wrapper .form-control:focus {
        padding: 6px 12px;
    }

    .main-header .search-wrapper > form svg {
        width: 18px;
        height: 18px;
        left: 10px;
    }
}

@media (min-width: 993px) and (max-width: 1199px) {
    body:has(.ele_sidebar_left) .main-header .search-wrapper {
        position: absolute;
        top: 10px;
        left: calc(70px + 15px);
        width: min(260px, calc((100vw - 70px - 48px) * 0.64));
        margin: 0;
    }

    .main-header .ele_header > .logo-wrapper {
        width: 70px;
        max-width: 70px;
        min-width: 70px;
        padding: 0;
        justify-content: center;
        overflow: visible !important;
    }

    .main-header .logo-wrapper .logo-pattern {
        margin-left: 0;
        object-position: center;
    }

    body:has(.ele_sidebar_left) .ele_navbar_top_right {
        right: 10px;
        padding: 8px 0;
    }
}

/* Hide floating quick-create FAB */
.ele_create_dropup {
    display: none !important;
}

/* --- Online / messenger (shared base) --- */
.ele_toggle_online {
    display: none;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    padding: 6px;
    line-height: 1;
    color: var(--header-color);
    border-radius: 50%;
}
body.night-mode .ele_toggle_online {
    color: var(--header-bg-color-dark);
}

.ele_online_backdrop {
    position: fixed;
    inset: 0;
    z-index: 1044;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}
body.ele_online_open .ele_online_backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
body.ele_online_open {
    overflow: hidden;
}

.ele_online_fab {
    display: none;
}

/* VK-style messenger tab — large phones, tablets, desktop */
@media (min-width: 669px) {
.ele_online_fab {
    position: fixed;
    right: 10px;
    bottom: 0;
    z-index: 1045;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 12px 12px 0 0;
    background: var(--nova-btn-gradient);
    background-color: var(--main-btn);
    color: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: box-shadow 0.2s ease, filter 0.2s ease;
}
.ele_online_fab:hover {
    filter: brightness(1.06);
}
.ele_online_fab svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
}
.ele_messenger_fab_counter {
    position: absolute;
    top: -6px;
    right: 2px;
    pointer-events: none;
}
body.ele_online_open .ele_online_fab {
    box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.22);
}
}

/* --- Desktop messenger: bottom popup with tabs (669px+) --- */
@media (min-width: 669px) {
body:not(.n_chat) .chat-box:not(.ele_online_inline) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.ele_navbar_top_right .js_live-messages {
    display: none !important;
}

.ele_toggle_online {
    display: none !important;
}

body:not(.n_chat) .chat-sidebar {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    top: auto !important;
    left: auto !important;
    bottom: 44px;
    right: 10px;
    width: min(360px, calc(100vw - 32px)) !important;
    max-height: min(480px, calc(100vh - 120px));
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
    background: var(--body-bg);
    z-index: 1046;
    overflow: hidden;
    transform: translateY(12px) scale(0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
}
body.night-mode:not(.n_chat) .chat-sidebar {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    background: var(--body-bg-color-dark);
}
body.ele_online_open:not(.n_chat) .chat-sidebar {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-height: min(420px, calc(100vh - 120px));
}

body:not(.n_chat) .chat-sidebar::before {
    display: none !important;
}

body:not(.n_chat) .chat-sidebar > .dropdown {
    display: none !important;
}

body:not(.n_chat) .ele_messenger_tabs {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    padding: 8px 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
body.night-mode:not(.n_chat) .ele_messenger_tabs {
    background: var(--body-bg-color-dark);
    border-color: rgba(255, 255, 255, 0.08);
}

body:not(.n_chat) .ele_messenger_tab {
    flex: 1 1 50%;
    border: 0;
    background: transparent;
    color: var(--body-color);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 8px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
body.night-mode:not(.n_chat) .ele_messenger_tab {
    color: #b0b3b8;
}
body:not(.n_chat) .ele_messenger_tab:hover {
    background: rgba(0, 0, 0, 0.04);
}
body.night-mode:not(.n_chat) .ele_messenger_tab:hover {
    color: #e4e6eb;
    background: rgba(255, 255, 255, 0.08);
}
body:not(.n_chat) .ele_messenger_tab.active {
    color: #555;
    background: rgba(0, 0, 0, 0.04);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}
body.night-mode:not(.n_chat) .ele_messenger_tab.active {
    color: var(--nova-sky);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--nova-blue-mid);
}

body:not(.n_chat) .chat-sidebar-inner {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 !important;
    align-items: stretch;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body:not(.n_chat) .ele_messenger_list_view {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body:not(.n_chat) .ele_messenger_pane {
    display: none;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
body:not(.n_chat) .ele_messenger_pane.active {
    display: flex;
}

body:not(.n_chat) .ele_messenger_pane_head {
    flex: 0 0 auto;
    justify-content: space-between;
    padding: 10px 12px 6px;
}
body:not(.n_chat) .ele_messenger_pane_title {
    font-size: 14px;
    font-weight: 600;
    color: var(--body-color);
    opacity: 0.7;
}
body.night-mode:not(.n_chat) .ele_messenger_pane_title {
    color: #e4e6eb;
    opacity: 0.85;
}
body:not(.n_chat) .ele_messenger_pane_head .btn {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    line-height: 36px;
    border-radius: 50%;
}
body.night-mode:not(.n_chat) .ele_messenger_pane_head .btn.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e6eb;
}
body.night-mode:not(.n_chat) .ele_messenger_pane_head .btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

body:not(.n_chat) .ele_messenger_scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

body:not(.n_chat) .js_live-messages-panel .ele_notifis > a.data-container,
body:not(.n_chat) .js_live-messages-panel .feeds-item .data-container {
    padding: 8px 10px;
    border-radius: 12px;
}
body:not(.n_chat) .js_live-messages-panel .ele_notifis > a.data-container:hover {
    background: rgba(0, 0, 0, 0.05);
}
body.night-mode:not(.n_chat) .js_live-messages-panel .ele_notifis > a.data-container:hover {
    background: rgba(255, 255, 255, 0.07);
}
body:not(.n_chat) .js_live-messages-panel ul {
    list-style: none;
    margin: 0;
    padding: 4px 6px 8px;
}

body:not(.n_chat) .ele_messenger_footer {
    flex: 0 0 auto;
    display: block;
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
body.night-mode:not(.n_chat) .ele_messenger_footer {
    border-color: rgba(255, 255, 255, 0.08);
}
body:not(.n_chat) .ele_messenger_footer:hover {
    background: rgba(0, 0, 0, 0.03);
}
body.night-mode:not(.n_chat) .ele_messenger_footer:hover {
    background: rgba(255, 255, 255, 0.06);
}

body:not(.n_chat) .ele_messenger_empty {
    padding: 28px 16px;
    margin: 0;
    font-size: 14px;
}
body.night-mode:not(.n_chat) .ele_messenger_empty {
    color: #9aa0a6 !important;
}
body.night-mode:not(.n_chat) .js_live-messages-panel .ele_notifis > a.data-container {
    color: #d1d1d1;
}
body.night-mode:not(.n_chat) .js_live-messages-panel .ele_notifis.unread > a.data-container {
    background: rgba(255, 255, 255, 0.08);
}
body.night-mode:not(.n_chat) .js_live-messages-panel .ele_notifis_data > .name {
    color: #f0f0f0;
}
body.night-mode:not(.n_chat) .js_live-messages-panel .ele_notifis_data > div.text {
    color: #b0b3b8;
}
body.night-mode:not(.n_chat) .js_live-messages-panel .ele_notifis_data .time {
    color: #9aa0a6;
}
body:not(.n_chat) .ele_messenger_empty svg {
    width: 42px;
    height: 42px;
    display: block;
    margin: 0 auto 10px;
}

body:not(.n_chat) .ele_messenger_pane_online .chat-sidebar-content {
    padding: 0 4px 8px;
}

body:not(.n_chat) .chat-sidebar-content,
body:not(.n_chat) .chat-sidebar-content .js_scroller {
    width: 100%;
}

body:not(.n_chat) .chat-sidebar-content .ele_online_user {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin-top: 2px !important;
    padding: 0 !important;
    text-align: left;
}

body:not(.n_chat) .chat-sidebar-content .ele_online_user_row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}
body:not(.n_chat) .chat-sidebar-content .ele_online_user:hover .ele_online_user_row {
    background: rgba(0, 0, 0, 0.05);
}
body.night-mode:not(.n_chat) .chat-sidebar-content .ele_online_user:hover .ele_online_user_row {
    background: rgba(255, 255, 255, 0.07);
}

body:not(.n_chat) .chat-sidebar-content .ele_online_user .data-avatar {
    float: none !important;
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
}
body:not(.n_chat) .chat-sidebar-content .ele_online_user .data-avatar img {
    border-radius: 50%;
}

body:not(.n_chat) .chat-sidebar-content .ele_online_user_name {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--body-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.night-mode:not(.n_chat) .chat-sidebar-content .ele_online_user_name {
    color: #ececec;
}

body:not(.n_chat) .ele_online_chat_view {
    display: none;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

body:not(.n_chat) .chat-sidebar.ele_online_chat_mode {
    max-height: min(560px, calc(100vh - 100px));
}

body:not(.n_chat) .chat-sidebar.ele_online_chat_mode .ele_messenger_tabs {
    display: none;
}

body:not(.n_chat) .chat-sidebar.ele_online_chat_mode .ele_online_chat_view {
    display: flex;
}

.ele_online_chat_header {
    flex: 0 0 auto;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
body.night-mode .ele_online_chat_header {
    border-color: rgba(255, 255, 255, 0.08);
}

.ele_online_chat_back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--body-color);
    cursor: pointer;
    transition: background 0.15s ease;
}
.ele_online_chat_back:hover {
    background: rgba(0, 0, 0, 0.06);
}
body.night-mode .ele_online_chat_back {
    color: #ececec;
}
body.night-mode .ele_online_chat_back:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ele_online_chat_head_info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ele_notifis_avatar {
    position: relative;
    flex: 0 0 auto;
}
.ele_notifis_avatar img,
.ele_notifis_avatar .left-avatar,
.ele_notifis_avatar .right-avatar {
    border-radius: 50%;
}
.ele_notifis_avatar .ele_conv_online_badge {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
    color: #31a24c;
    box-sizing: content-box;
    pointer-events: none;
}
body.night-mode .ele_notifis_avatar .ele_conv_online_badge {
    background: #1f2937;
}

.ele_conv_typing {
    color: var(--main-btn);
    font-style: normal;
    font-weight: 500;
}
body.night-mode .ele_conv_typing {
    color: var(--nova-sky);
}

.ele_online_chat_typing.is-active {
    display: flex !important;
    align-items: center;
    gap: 4px;
}

.ele_online_chat_title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ele_online_chat_typing {
    display: none;
    font-size: 12px;
    line-height: 1.25;
    color: var(--main-btn);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.night-mode .ele_online_chat_typing {
    color: var(--nova-sky);
}

/* --- Chat typing indicator --- */
.chat-typing.ele_chat_typing {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 2px 12px 6px;
    font-size: 12px;
    line-height: 1.3;
    color: #6b7280;
}
body.night-mode .chat-typing.ele_chat_typing {
    color: #9ca3af;
}
.ele_msg_name .chat-typing.ele_chat_typing {
    display: none;
    padding: 0;
    margin-top: 1px;
}
.ele_messenger_panel.ele_online_chat_mode .ele_online_chat_slot .chat-typing.ele_chat_typing {
    display: none !important;
}
.ele_chat_typing_text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ele_chat_typing_name {
    font-weight: 600;
    color: var(--body-color);
}
body.night-mode .ele_chat_typing_name {
    color: #e5e7eb;
}
.ele_chat_typing_suffix {
    font-weight: 400;
    text-transform: lowercase;
    opacity: 0.9;
}
.ele_online_chat_typing .ele_chat_typing_suffix,
.ele_online_chat_typing .ele_chat_typing_name {
    color: inherit;
}
.ele_chat_typing_dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.ele_chat_typing_dots i {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    animation: ele_typing_blink 1.2s infinite ease-in-out;
}
.ele_chat_typing_dots i:nth-child(2) {
    animation-delay: 0.2s;
}
.ele_chat_typing_dots i:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes ele_typing_blink {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-1px);
    }
}

.ele_online_chat_slot {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ele_online_chat_slot .chat-widget.ele_online_inline {
    display: flex !important;
    flex-direction: column;
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
    background: transparent;
}

.ele_online_chat_slot .chat-widget.ele_online_inline .chat-widget-head {
    display: none !important;
}

.ele_online_chat_slot .chat-widget.ele_online_inline .chat-widget-content {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
}

.ele_online_chat_slot .chat-widget.ele_online_inline .chat-conversations.js_scroller {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
}

.ele_online_chat_slot .chat-widget.ele_online_inline .chat-form {
    flex: 0 0 auto;
}
}

/* --- Mobile: header online button + slide-in panel (phones with bottom bar) --- */
@media (max-width: 668px) {
    .ele_online_fab {
        display: none !important;
    }

    .ele_navbar_top_right .js_live-messages {
        display: flex !important;
        align-items: center;
        position: relative;
    }

    .ele_toggle_online {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    body.ele_online_open .ele_toggle_online {
        color: var(--main-btn);
    }

    body:not(.n_chat) .chat-sidebar {
        display: flex !important;
        flex-direction: column;
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: min(320px, 92vw) !important;
        max-height: none !important;
        min-height: 0 !important;
        height: auto;
        z-index: 1046;
        border: 0;
        border-left: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 0;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
        background: var(--body-bg);
        transform: translateX(100%);
        opacity: 1;
        visibility: visible;
        pointer-events: none;
        transition: transform 0.25s ease;
    }
    body.night-mode:not(.n_chat) .chat-sidebar {
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
        background: var(--body-bg-color-dark);
    }
    body.ele_online_open:not(.n_chat) .chat-sidebar {
        transform: translateX(0);
        pointer-events: auto;
    }

    body:not(.n_chat) .chat-sidebar::before {
        display: none !important;
    }

    body:not(.n_chat) .chat-sidebar-inner {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0 !important;
        align-items: stretch;
        display: flex;
        flex-direction: column;
    }

    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .chat-sidebar-inner {
        overflow-x: hidden;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .ele_messenger_list_view,
    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .ele_messenger_pane_online {
        flex: none;
        min-height: auto;
        overflow: visible;
    }

    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .ele_messenger_scroll,
    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .chat-sidebar-content {
        flex: none;
        min-height: auto;
        overflow: visible !important;
    }

    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .ele_messenger_pane_online .ele_messenger_pane_head {
        padding: 12px 10px 6px;
    }

    body:not(.n_chat) .ele_messenger_tabs {
        display: none !important;
    }

    body:not(.n_chat) .ele_messenger_list_view {
        display: flex !important;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    body:not(.n_chat) .ele_messenger_pane {
        display: none;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .ele_messenger_pane_messages {
        display: none !important;
    }

    body:not(.n_chat) .chat-sidebar:not(.ele_online_chat_mode) .ele_messenger_pane_online {
        display: flex !important;
    }

    body:not(.n_chat) .ele_messenger_pane.active {
        display: flex !important;
    }

    body:not(.n_chat) .ele_online_chat_view {
        display: none !important;
    }

    body:not(.n_chat) .chat-sidebar.ele_online_chat_mode .ele_messenger_list_view,
    body:not(.n_chat) .chat-sidebar.ele_online_chat_mode .ele_messenger_tabs {
        display: none !important;
    }

    body:not(.n_chat) .chat-sidebar.ele_online_chat_mode .ele_online_chat_view {
        display: flex !important;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    body:not(.n_chat) .chat-sidebar.ele_online_chat_mode .chat-sidebar-inner {
        overflow: hidden !important;
    }

    body:not(.n_chat) .ele_messenger_scroll,
    body:not(.n_chat) .chat-sidebar-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        width: 100%;
    }

    body:not(.n_chat) .chat-sidebar-content .js_scroller {
        width: 100%;
    }

    body:not(.n_chat) .chat-sidebar-content .ele_online_user {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin-top: 2px !important;
        padding: 0 !important;
        text-align: left;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user:first-child {
        margin-top: 6px !important;
    }

    body:not(.n_chat) .chat-sidebar-content .ele_online_user_row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 8px 10px;
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.15s ease;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user:hover .ele_online_user_row {
        background: rgba(0, 0, 0, 0.05);
    }
    body.night-mode:not(.n_chat) .chat-sidebar-content .ele_online_user:hover .ele_online_user_row {
        background: rgba(255, 255, 255, 0.07);
    }

    body:not(.n_chat) .chat-sidebar-content .ele_online_user .data-avatar {
        float: none !important;
        flex: 0 0 44px;
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user .data-avatar img {
        border-radius: 12px;
    }

    body:not(.n_chat) .chat-sidebar-content .ele_online_user_name {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        font-size: 15px;
        font-weight: 500;
        letter-spacing: 0.15px;
        line-height: 1.3;
        color: var(--body-color);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    body.night-mode:not(.n_chat) .chat-sidebar-content .ele_online_user_name {
        color: #ececec;
    }
}

/* --- Mobile header & bottom bar --- */
@media (max-width: 668px) {
    body.ele_online_open .ele_online_backdrop {
        bottom: 45px;
    }

    body:not(.n_chat) .chat-sidebar {
        width: min(272px, 88vw) !important;
    }
    body:not(.n_chat) .chat-sidebar > .dropdown {
        display: none !important;
    }
    body:not(.n_chat) .chat-sidebar-inner {
        padding: 0 6px 10px !important;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user:first-child {
        margin-top: 2px !important;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user {
        margin-top: 0 !important;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user_row {
        gap: 10px;
        padding: 5px 8px;
        border-radius: 10px;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user .data-avatar {
        flex: 0 0 36px;
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user .data-avatar img {
        border-radius: 10px;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user .data-avatar svg {
        width: 11px;
        height: 11px;
        padding: 2px;
    }
    body:not(.n_chat) .chat-sidebar-content .ele_online_user_name {
        font-size: 14px;
    }
}

@media (min-width: 993px) and (max-width: 1199px) {
    body:not(.n_chat) .chat-sidebar {
        width: min(340px, calc(100vw - 24px)) !important;
        max-height: min(460px, calc(100vh - 80px));
        right: 8px;
        bottom: 48px;
    }

    body.ele_online_open:not(.n_chat) .chat-sidebar {
        min-height: min(400px, calc(100vh - 80px));
    }

    .ele_online_fab {
        right: 8px;
    }

    /* header: keep search/icons from overlapping on compact desktop widths */
    .main-header .search-wrapper {
        max-width: calc(100vw - 240px);
    }

    body:has(.ele_sidebar_left) .main-header .search-wrapper {
        width: min(240px, calc(100vw - 70px - 220px)) !important;
        max-width: calc(100vw - 290px);
    }

    .ele_navbar_top_right > .dropdown.show .dropdown-menu {
        z-index: 1048;
    }
}

@media (max-width: 1199px) {
    /* compact search in top bar */
    .ele_header {
        gap: 4px;
        min-width: 0;
    }
    .main-header .search-wrapper {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        max-width: none;
        margin: 0 4px 0 2px;
    }
    .main-header .search-wrapper > form {
        margin: 0;
    }
    .main-header .search-wrapper .form-control {
        height: 34px;
        padding: 5px 10px 5px 30px;
        font-size: 13px;
        border-radius: 999px;
    }
    .main-header .search-wrapper > form svg {
        width: 16px;
        height: 16px;
        left: 8px;
    }
    .main-header .logo-wrapper {
        flex-shrink: 0;
    }

    .main-header .logo-wrapper img {
        max-width: calc(var(--ele-sidebar-w, 250px) - 24px);
        max-height: 30px;
    }

    .main-header .logo-wrapper .logo-pattern {
        max-width: 34px;
        max-height: 30px;
        width: 34px;
        height: 30px;
        margin-left: 0;
        object-position: 44% center;
    }
    .ele_toggle_sidebar {
        margin: 0 4px 0 0;
        padding: 4px;
    }

    /* bottom action bar (mobile navbar): brand icon colors */
    .ele_navbar_top_right .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle),
    .ele_navbar_top_right .show > .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle),
    .ele_navbar_top_right .ele_hdr_droptoggle.btn-light:not(.ele_hdr_user_droptoggle) {
        background: transparent !important;
        box-shadow: none !important;
        color: var(--ele-nav-icon) !important;
    }

    .ele_navbar_top_right .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle):hover {
        background: var(--ele-nav-icon-bg-hover) !important;
        color: var(--ele-nav-icon-active) !important;
    }

    .ele_navbar_top_right .show > .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle) {
        color: var(--ele-nav-icon-active) !important;
        background: var(--ele-nav-icon-bg-active) !important;
    }

    body.night-mode .ele_navbar_top_right .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle),
    body.night-mode .ele_navbar_top_right .show > .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle) {
        color: var(--ele-nav-icon) !important;
    }

    body.night-mode .ele_navbar_top_right .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle):hover {
        background: var(--ele-nav-icon-bg-hover) !important;
        color: var(--ele-nav-icon-active) !important;
    }

    body.night-mode .ele_navbar_top_right .show > .ele_hdr_droptoggle:not(.ele_hdr_user_droptoggle) {
        color: var(--ele-nav-icon-active) !important;
    }
    .ele_navbar_top_right .ele_hdr_droptoggle:before {
        display: none !important;
    }
    .ele_navbar_top_right .ele_hdr_user_droptoggle {
        padding: 4px 2px 4px 4px;
        border-radius: 10px;
    }
    .ele_navbar_top_right .ele_hdr_user_droptoggle img {
        width: 28px;
        height: 28px;
        border-radius: 50% !important;
        object-fit: cover;
        display: block;
    }
    .ele_navbar_top_right .ele_hdr_user_chevron {
        width: 10px;
        height: 10px;
        margin-right: 0;
    }
    .ele_navbar_top_right .ele_hdr_user_droptoggle > span:not(.ele_hdr_user_toggle_inner) {
        display: none !important;
    }

    /* optional footer bottom bar (if enabled in theme) */
    .footer-bottom-bar-links > .link > a,
    .footer-bottom-bar-links > .link > a:hover,
    .footer-bottom-bar-links > .link.active > a {
        background: transparent !important;
    }
    .footer-bottom-bar .user-menu .ele_hdr_user_droptoggle img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
    }

    /* FAB «+» — компактная, над нижним баром */
    .ele_create_dropup {
        right: 12px;
        bottom: calc(45px + 10px);
        z-index: 94;
    }
    .ele_create_dropup > .btn {
        min-width: 40px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        border-radius: 50%;
        padding: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    }
    body.night-mode .ele_create_dropup > .btn {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    }
    .ele_create_dropup > .btn svg {
        width: 20px;
        height: 20px;
    }
    .ele_create_dropup > .dropdown-menu:before {
        right: 12px;
    }

    /* плюс на «Создать историю» в ленте */
    .ele_home_stories .create_story a span {
        width: 28px;
        height: 28px;
        bottom: -8px;
        padding: 2px;
    }
    .ele_home_stories .create_story span svg {
        padding: 5px;
    }
}

/* Tablet / large phone: header icons stay top-right — shrink search, bottom chat FAB */
@media (min-width: 669px) and (max-width: 992px) {
    .main-header .ele_navbar_top > .container-fluid {
        padding-right: 158px;
        box-sizing: border-box;
    }

    .main-header .ele_header {
        min-width: 0;
        max-width: 100%;
    }

    .main-header .search-wrapper {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: auto !important;
        margin: 0 2px 0 0 !important;
    }

    .main-header .search-wrapper > form {
        margin: 0;
        min-width: 0;
    }

    .main-header .search-wrapper .form-control {
        height: 32px !important;
        padding: 4px 8px 4px 28px !important;
        font-size: 12px !important;
        border-radius: 999px;
    }

    .main-header .search-wrapper > form svg {
        width: 14px !important;
        height: 14px !important;
        left: 7px !important;
    }

    .ele_toggle_online {
        display: none !important;
    }

    body:not(.n_chat) .chat-sidebar {
        width: min(320px, calc(100vw - 20px)) !important;
        max-height: min(420px, calc(100vh - 72px));
        right: 6px;
        bottom: 48px;
    }

    body.ele_online_open:not(.n_chat) .chat-sidebar {
        min-height: min(360px, calc(100vh - 72px));
    }

    .ele_online_fab {
        right: 6px;
    }

    .ele_navbar_top_right > .dropdown.show .dropdown-menu {
        z-index: 1048;
    }
}

/* Desktop: left sidebar always visible — no header burger */
@media (min-width: 993px) {
    .ele_toggle_sidebar {
        display: none !important;
    }

    .ele_sidebar_left {
        background: transparent;
    }

    body.night-mode .ele_sidebar_left {
        background: transparent;
    }
}

/* Mobile: burger opens left sidebar — full-screen overlay like before */
@media (max-width: 992px) {
    .main-header .logo-wrapper {
        display: none !important;
    }

    .ele_navbar_top_side {
        display: none !important;
    }

    .ele_sidebar_left {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        max-height: none;
        z-index: 1046;
        opacity: 0;
        pointer-events: none;
        transform: none;
        transition: opacity 250ms;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 60px 0 0;
        background: var(--ele-gray-surface);
    }

    body.night-mode .ele_sidebar_left {
        background: var(--ele-gray-surface);
    }

    body.side_open .ele_sidebar_left {
        opacity: 1;
        pointer-events: auto;
    }

    .ele_sidebar_left .ele_prem,
    .ele_sidebar_left .sidebar_innr > .btn span {
        display: inline !important;
    }

    .ele_sidebar_left .sidebar_innr > .btn {
        min-height: 48px !important;
        min-width: auto !important;
        padding: 0 16px !important;
        justify-content: flex-start;
    }

    .ele_sidebar_left .sidebar_innr > .btn svg,
    .ele_sidebar_left .sidebar_innr > .btn img {
        margin: 0 !important;
        width: 24px !important;
        height: 24px !important;
    }

    .ele_sidebar_left .sidebar_innr {
        padding: 0 26px 26px !important;
        max-height: 100%;
    }
}

@media (max-width: 668px) {
    .ele_sidebar_left {
        transition: none;
    }
}

/* Group / page / profile: posts left, info right */
@media (min-width: 992px) {
    .ele_node_layout {
        display: flex;
        flex-wrap: wrap;
    }
    .ele_node_layout .ele_node_posts {
        order: 1;
    }
    .ele_node_layout .ele_node_info {
        order: 2;
    }
}

/* --- Thin custom scrollbars (light & dark) --- */
.ele_scroll,
.custom-scrollbar,
.ele_messenger_scroll,
.chat-sidebar-content,
.ele_sidebar_left .sidebar_innr,
.js_scroller,
.dropdown-menu,
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}
body.night-mode .ele_scroll,
body.night-mode .custom-scrollbar,
body.night-mode .ele_messenger_scroll,
body.night-mode .chat-sidebar-content,
body.night-mode .ele_sidebar_left .sidebar_innr,
body.night-mode .js_scroller,
body.night-mode .dropdown-menu,
body.night-mode .modal-body {
    scrollbar-color: rgba(255, 255, 255, 0.26) transparent;
}

.ele_scroll::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar,
.custom-scrollbar ::-webkit-scrollbar,
.ele_messenger_scroll::-webkit-scrollbar,
.chat-sidebar-content::-webkit-scrollbar,
.ele_sidebar_left .sidebar_innr::-webkit-scrollbar,
.js_scroller::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    visibility: visible !important;
}
.ele_scroll::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar-track,
.custom-scrollbar ::-webkit-scrollbar-track,
.ele_messenger_scroll::-webkit-scrollbar-track,
.chat-sidebar-content::-webkit-scrollbar-track,
.ele_sidebar_left .sidebar_innr::-webkit-scrollbar-track,
.js_scroller::-webkit-scrollbar-track,
.dropdown-menu::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.ele_scroll::-webkit-scrollbar-thumb,
.custom-scrollbar::-webkit-scrollbar-thumb,
.custom-scrollbar ::-webkit-scrollbar-thumb,
.ele_messenger_scroll::-webkit-scrollbar-thumb,
.chat-sidebar-content::-webkit-scrollbar-thumb,
.ele_sidebar_left .sidebar_innr::-webkit-scrollbar-thumb,
.js_scroller::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 0;
    visibility: visible !important;
}
.ele_scroll::-webkit-scrollbar-thumb:hover,
.custom-scrollbar::-webkit-scrollbar-thumb:hover,
.custom-scrollbar ::-webkit-scrollbar-thumb:hover,
.ele_messenger_scroll::-webkit-scrollbar-thumb:hover,
.chat-sidebar-content::-webkit-scrollbar-thumb:hover,
.ele_sidebar_left .sidebar_innr::-webkit-scrollbar-thumb:hover,
.js_scroller::-webkit-scrollbar-thumb:hover,
.dropdown-menu::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.32);
}
body.night-mode .ele_scroll::-webkit-scrollbar-thumb,
body.night-mode .custom-scrollbar::-webkit-scrollbar-thumb,
body.night-mode .custom-scrollbar ::-webkit-scrollbar-thumb,
body.night-mode .ele_messenger_scroll::-webkit-scrollbar-thumb,
body.night-mode .chat-sidebar-content::-webkit-scrollbar-thumb,
body.night-mode .ele_sidebar_left .sidebar_innr::-webkit-scrollbar-thumb,
body.night-mode .js_scroller::-webkit-scrollbar-thumb,
body.night-mode .dropdown-menu::-webkit-scrollbar-thumb,
body.night-mode .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.26);
}
body.night-mode .ele_scroll::-webkit-scrollbar-thumb:hover,
body.night-mode .custom-scrollbar::-webkit-scrollbar-thumb:hover,
body.night-mode .custom-scrollbar ::-webkit-scrollbar-thumb:hover,
body.night-mode .ele_messenger_scroll::-webkit-scrollbar-thumb:hover,
body.night-mode .chat-sidebar-content::-webkit-scrollbar-thumb:hover,
body.night-mode .ele_sidebar_left .sidebar_innr::-webkit-scrollbar-thumb:hover,
body.night-mode .js_scroller::-webkit-scrollbar-thumb:hover,
body.night-mode .dropdown-menu::-webkit-scrollbar-thumb:hover,
body.night-mode .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.38);
}
.ele_scroll::-webkit-scrollbar-button,
.custom-scrollbar::-webkit-scrollbar-button,
.custom-scrollbar ::-webkit-scrollbar-button,
.ele_messenger_scroll::-webkit-scrollbar-button,
.js_scroller::-webkit-scrollbar-button {
    display: none;
}

/* --- Unread badges (red circle + count) --- */
.ele_unread_badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e64646 !important;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}
body.night-mode .ele_unread_badge {
    border-color: #212121;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}
.ele_unread_badge:empty,
.ele_unread_badge.x-hidden {
    display: none !important;
}

.ele_navbar_top_right .dropdown .counter.ele_unread_badge,
.js_live-messages > .counter.ele_unread_badge {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 2;
    pointer-events: none;
}

.chat-head-label .js_chat-box-label.ele_unread_badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    margin-left: 6px;
    vertical-align: middle;
}
.chat-widget.ele_online_inline .chat-head-label .js_chat-box-label.ele_unread_badge {
    position: absolute;
    top: -2px;
    right: -2px;
    margin: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
}

body:not(.n_chat) .js_live-messages-panel .ele_notifis_data.message,
body:not(.n_chat) .js_live-messages .ele_notifis_data.message {
    position: relative;
}

/* Unread conversation row highlight (all message lists) */
.ele_notifis.unread > a.data-container {
    background: rgba(230, 70, 70, 0.1) !important;
    border-left: 3px solid #e64646;
    padding-left: 5px;
}
body.night-mode .ele_notifis.unread > a.data-container {
    background: rgba(230, 70, 70, 0.18) !important;
}
.ele_notifis.unread .ele_notifis_avatar::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e64646;
    border: 2px solid #fff;
    box-sizing: border-box;
    z-index: 2;
}
body.night-mode .ele_notifis.unread .ele_notifis_avatar::after {
    border-color: #212121;
}
.ele_notifis.unread .ele_notifis_data > .name {
    font-weight: 700;
}
.ele_notifis.unread .ele_notifis_data > .text {
    font-weight: 500;
}

.js_live-messages-panel .ele_notifis_data.message,
.js_live-messages .ele_notifis_data.message,
.js_live-messages-alt .ele_notifis_data.message,
.open_msg_user .ele_notifis_data.message {
    position: relative;
    padding-right: 34px;
}
.ele_conv_unread_badge {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    border-width: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}
body:not(.n_chat) .ele_conv_unread_badge {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    border-width: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}
body:not(.n_chat) .js_live-messages-panel .ele_notifis_data.message,
body:not(.n_chat) .js_live-messages .ele_notifis_data.message {
    padding-right: 34px;
}
body:not(.n_chat) .ele_notifis.unread .ele_notifis_avatar::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e64646;
    border: 2px solid #fff;
    box-sizing: border-box;
    z-index: 2;
}
body.night-mode:not(.n_chat) .ele_notifis.unread .ele_notifis_avatar::after {
    border-color: #212121;
}
body:not(.n_chat) .ele_notifis.unread .ele_notifis_data > .name {
    font-weight: 700;
}
body:not(.n_chat) .ele_notifis.unread > a.data-container {
    background: rgba(230, 70, 70, 0.1) !important;
    border-left: 3px solid #e64646;
    padding-left: 5px;
}
body.night-mode:not(.n_chat) .ele_notifis.unread > a.data-container {
    background: rgba(230, 70, 70, 0.18) !important;
}
body.night-mode:not(.n_chat) .js_live-messages-panel .ele_notifis.unread > a.data-container {
    background: rgba(230, 70, 70, 0.18) !important;
}
body:not(.n_chat) .ele_notifis.unread .ele_notifis_data > .text {
    font-weight: 500;
}

/* --- Feed tabs (newsfeed) --- */
.ele_feed_tabs {
    margin-bottom: 16px;
    padding: 4px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body.night-mode .ele_feed_tabs {
    border-color: #2a2c2d !important;
}

.ele_feed_tabs_inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
}

.ele_feed_tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Gilroy', Roboto, sans-serif;
    color: #666;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease;
}

body.night-mode .ele_feed_tab {
    color: #aaa;
}

.ele_feed_tab svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.ele_feed_tab_label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ele_feed_tab:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

body.night-mode .ele_feed_tab:hover {
    color: #eee;
    background: rgba(255, 255, 255, 0.06);
}

.ele_feed_tab.active {
    color: #555;
    background: rgba(0, 0, 0, 0.04);
    box-shadow: none;
}

body.night-mode .ele_feed_tab.active {
    color: #fff;
    background: var(--nova-btn-gradient);
    background-color: var(--main-btn);
}

.ele_feed_tab.active svg {
    opacity: 1;
}

/* Light theme — muted gray active tab highlights (feed-style) */
body:not(.night-mode) .content-tabs > ul > li.active > a {
    color: #666;
}

body:not(.night-mode) .content-tabs > ul > li.active > a:before {
    opacity: 0.12;
}

body:not(.night-mode) .ele_user_profile_nav li .active {
    color: #555;
}

body:not(.night-mode) .ele_user_profile_nav li .active:after {
    background-color: rgba(0, 0, 0, 0.14);
}

body:not(.night-mode) .nav-started .nav-link.active {
    color: #888;
}

body:not(.night-mode) .nav-started .nav-link.active:before {
    opacity: 0.12;
}

@media (max-width: 767px) {
    .ele_feed_tabs {
        margin-bottom: 12px;
        padding: 3px !important;
    }

    .ele_feed_tabs_inner {
        gap: 3px;
    }

    .ele_feed_tab {
        flex-direction: column;
        gap: 0;
        padding: 8px 4px;
        font-size: 0;
        border-radius: 8px;
    }

    .ele_feed_tab svg {
        width: 20px;
        height: 20px;
    }

    .ele_feed_tab_label {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .ele_feed_tab {
        padding: 7px 8px;
        font-size: 12px;
        gap: 5px;
    }

    .ele_feed_tab svg {
        width: 15px;
        height: 15px;
    }
}

/* --- Feed nav panel (desktop right sidebar) --- */
.sidebar .ele_feed_nav_panel {
    padding: 8px !important;
}

.ele_feed_nav_panel {
    padding: 8px !important;
    border: 1px solid var(--ele-gray-border) !important;
    box-shadow: none !important;
    background-color: var(--ele-gray-surface) !important;
}

body.night-mode .ele_feed_nav_panel {
    border-color: var(--ele-gray-border) !important;
    background-color: var(--ele-gray-surface) !important;
}

.ele_feed_nav_panel_list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ele_feed_nav_item {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Gilroy', Roboto, sans-serif;
    color: #666;
    text-decoration: none !important;
    transition: background-color 0.18s ease, color 0.18s ease;
}

body.night-mode .ele_feed_nav_item {
    color: #aaa;
}

.ele_feed_nav_item:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

body.night-mode .ele_feed_nav_item:hover {
    color: #eee;
    background: rgba(255, 255, 255, 0.06);
}

.ele_feed_nav_item.active {
    color: #333;
    background: rgba(0, 0, 0, 0.06);
}

body.night-mode .ele_feed_nav_item.active {
    color: #eee;
    background: rgba(255, 255, 255, 0.1);
}

.ele_pages_create_btn {
    font-weight: 600;
    border-radius: 10px;
}

.ele_pages_nav_divider {
    height: 1px;
    margin: 14px 0;
    background: var(--ele-gray-border);
}

.ele_pages_nav_actions {
    padding: 0;
}

body.night-mode .ele_pages_nav_divider {
    background: var(--ele-gray-border);
}

/* Pages list — compact rows */
.ele_pages_page .ele_my_pages {
    padding: 12px 10px;
}

.ele_pages_page .ele_my_pages .info {
    padding-right: 14px !important;
}

.ele_pages_page .ele_my_pages .info .avatar {
    margin-right: 14px !important;
}

.ele_pages_page .ele_my_pages .info .avatar img {
    width: 53px;
    height: 53px;
}

.ele_pages_page .ele_my_pages .text h3 {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 2px;
    font-weight: 600;
}

.ele_pages_page .ele_my_pages .text h3 a {
    text-decoration: none;
}

.ele_pages_page .ele_my_pages .text p {
    font-size: 14px;
    line-height: 1.35;
    color: #888;
}

body.night-mode .ele_pages_page .ele_my_pages .text p {
    color: #aaa;
}

.ele_pages_page .ele_my_pages .text p svg {
    width: 17px;
    height: 17px;
}

.ele_pages_page .ele_my_pages > div:not(.info) .btn {
    margin: 0 !important;
    font-size: 15px;
    line-height: 36px;
    min-height: 36px;
    padding: 0 14px;
}

@media (max-width: 500px) {
    .ele_pages_page .ele_my_pages .info .avatar img {
        width: 48px;
        height: 48px;
    }

    .ele_pages_page .ele_my_pages .text h3 {
        font-size: 17px;
    }

    .ele_pages_page .ele_my_pages > div:not(.info) .btn {
        margin: 0 !important;
    }
}

/* --- Profile / group / page search (matches collapsed publisher) --- */
.sidebar .ele_content.ele_node_search,
.ele_content.ele_node_search {
    padding: 10px !important;
    margin-bottom: 16px !important;
    border: 1px solid var(--ele-gray-border) !important;
}

body.night-mode .sidebar .ele_content.ele_node_search,
body.night-mode .ele_content.ele_node_search {
    border-color: var(--ele-gray-border) !important;
}

.ele_content.ele_node_search form {
    margin: 0;
}

.el_prof_search_bar {
    position: relative;
    height: 42px;
}

.el_prof_search_bar .el_prof_search_input,
.el_prof_search_bar .form-control {
    width: 100%;
    height: 42px !important;
    line-height: 42px;
    border: none !important;
    border-radius: 10px !important;
    background: var(--ele-gray-input) !important;
    padding: 0 96px 0 16px !important;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Gilroy', Roboto, sans-serif;
    color: #333;
    box-shadow: none !important;
    transition: background-color 0.18s ease;
}

.el_prof_search_bar .el_prof_search_input::placeholder {
    color: inherit;
    opacity: 0.65;
}

.el_prof_search_bar .el_prof_search_input:focus {
    background: var(--ele-gray-input-focus) !important;
    outline: none;
}

body.night-mode .el_prof_search_bar .el_prof_search_input,
body.night-mode .el_prof_search_bar .form-control {
    background: #333 !important;
    color: #e9ecef;
}

body.night-mode .el_prof_search_bar .el_prof_search_input:focus {
    background: #3a3a3a !important;
}

.el_prof_search_bar .el_prof_search_submit {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 10px;
    border: none;
    border-radius: 7px;
    background: #e8e8e8;
    color: #555;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Gilroy', Roboto, sans-serif;
    cursor: pointer;
    transition: background-color 0.18s ease;
    z-index: 1;
}

body.night-mode .el_prof_search_bar .el_prof_search_submit {
    background: #3a3a3a;
    color: #ccc;
}

.el_prof_search_bar .el_prof_search_submit:hover {
    background: #ddd;
}

body.night-mode .el_prof_search_bar .el_prof_search_submit:hover {
    background: #4a4a4a;
}

.el_prof_search_bar .el_prof_search_submit svg {
    flex-shrink: 0;
}

/* --- Search page --- */
.ele_search_page .ele_feed_tabs {
    margin-bottom: 16px;
}

.ele_search_page .ele_search_form {
    padding: 12px !important;
    margin-bottom: 16px !important;
    border: 1px solid #e9ecef !important;
}

body.night-mode .ele_search_page .ele_search_form {
    border-color: #2a2c2d !important;
}

.ele_search_page .ele_search_empty {
    color: #888;
}

/* --- Market product post sidebar --- */
.ele_post_product_page {
    margin-top: 40px !important;
}

.ele_market_post_sidebar_block {
    padding: 14px !important;
}

.ele_market_sidebar_all_link {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.ele_market_seller_card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ele_market_seller_avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.ele_market_seller_avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ele_market_seller_meta {
    flex: 1;
    min-width: 0;
}

.ele_market_seller_name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    word-break: break-word;
}

.ele_market_seller_row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 4px;
}

.ele_market_seller_label {
    color: #888;
}

body.night-mode .ele_market_seller_label {
    color: #aaa;
}

.ele_market_seller_value {
    font-weight: 500;
    text-align: right;
}

.ele_market_sidebar_products {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ele_market_sidebar_product {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none !important;
    color: inherit !important;
    padding: 8px;
    margin: -8px;
    border-radius: 10px;
    transition: background-color 0.18s ease;
}

.ele_market_sidebar_product:hover {
    background: var(--ele-gray-input);
}

body.night-mode .ele_market_sidebar_product:hover {
    background: #2a2c2d;
}

.ele_market_sidebar_product_img {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ele-gray-input);
}

.ele_market_sidebar_product_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ele_market_sidebar_product_info {
    flex: 1;
    min-width: 0;
}

.ele_market_sidebar_product_name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ele_market_sidebar_product_price {
    font-size: 14px;
    font-weight: 600;
    color: var(--main-btn);
}

.ele_market_contact_mobile {
    display: none;
}

@media (max-width: 991px) {
    .ele_market_seller_block,
    .ele_market_category_block {
        display: none !important;
    }

    .ele_market_contact_mobile {
        display: block;
    }
}

/* --- Market page --- */
.ele_market_toolbar {
    padding: 8px !important;
    margin-bottom: 16px !important;
    border: 1px solid var(--ele-gray-border) !important;
    border-radius: 12px !important;
}

body.night-mode .ele_market_toolbar {
    border-color: var(--ele-gray-border) !important;
}

.ele_market_toolbar_row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ele_market_toolbar_item {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px !important;
    border-radius: 10px !important;
    background: var(--ele-gray-input) !important;
    color: #333 !important;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.ele_market_toolbar_item > span:not(.ele_market_sort_inner):not(.ele_market_sort_label):not(.ele_market_sort_value) {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

body.night-mode .ele_market_toolbar_item {
    background: #2a2c2d !important;
    color: #e9ecef !important;
}

.ele_market_toolbar_item svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.ele_market_chevron {
    opacity: 0.45;
    margin-left: 2px;
}

.ele_market_search_form {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.ele_market_search_form .el_prof_search_bar {
    width: 100%;
}

.ele_market_search_form .el_prof_search_input {
    padding-right: 16px !important;
}

.ele_market_sort {
    flex-shrink: 0;
}

.ele_market_sort_btn {
    min-width: 200px;
    max-width: none;
    text-align: left;
}

.ele_market_sort_inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    min-width: 0;
}

.ele_market_sort_label {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.55;
}

.ele_market_sort_value {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.ele_market_create_btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.ele_market_loader {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.js_market-stream.is-loading {
    min-height: 120px;
    opacity: 0.55;
    pointer-events: none;
}

.js_market-results.is-loading {
    min-height: 120px;
}

.ele_market_catalog_menu {
    max-height: 420px;
    overflow: hidden;
}

.ele_market_catalog_menu .js_scroller {
    max-height: 260px;
    overflow-y: auto;
}

.ele_market_location_form {
    min-width: 240px;
}

@media (max-width: 991px) {
    .ele_market_toolbar_row {
        flex-wrap: wrap;
    }

    .ele_market_search_form {
        flex: 1 1 200px;
    }
}

@media (max-width: 575px) {
    .ele_market_toolbar {
        padding: 10px !important;
    }

    .ele_market_toolbar_row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ele_market_catalog,
    .ele_market_sort,
    .ele_market_search_form {
        width: 100%;
        max-width: none;
        flex: none;
        min-width: 0;
    }

    .ele_market_catalog .dropdown,
    .ele_market_sort .dropdown {
        width: 100%;
    }

    .ele_market_toolbar_item,
    .ele_market_create_btn {
        width: 100%;
        height: 42px;
        font-size: 14px;
        padding: 0 14px !important;
        flex-shrink: 1;
        justify-content: space-between;
    }

    .ele_market_toolbar_item > span:not(.ele_market_sort_inner):not(.ele_market_sort_label):not(.ele_market_sort_value) {
        max-width: none;
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .ele_market_sort_btn {
        min-width: 0;
        max-width: none;
    }

    .ele_market_sort_inner {
        flex: 1;
        min-width: 0;
    }

    .ele_market_sort_value {
        max-width: none;
    }

    .ele_market_search_form .el_prof_search_bar,
    .ele_market_search_form .el_prof_search_input {
        height: 42px !important;
        line-height: 42px;
    }

    .ele_market_create_btn {
        justify-content: center;
    }
}

/* --- Nova image loading overlay --- */
.ele-img-loader-host {
    overflow: hidden;
}

.ele-img-loader-host:not(.ele-img-loader--loaded) {
    min-height: 140px;
}

.pg_1x.ele-img-loader-host:not(.ele-img-loader--loaded),
.pg_2x.ele-img-loader-host:not(.ele-img-loader--loaded),
.pg_1o3_in.ele-img-loader-host:not(.ele-img-loader--loaded),
.pg_2o3_in.ele-img-loader-host:not(.ele-img-loader--loaded) {
    min-height: 200px;
}

.ele-img-loader__overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

body.night-mode .ele-img-loader__overlay {
    background: rgba(10, 12, 20, 0.78);
}

.ele-img-loader-host.ele-img-loader--loaded .ele-img-loader__overlay {
    opacity: 0;
    visibility: hidden;
}

.ele-img-loader__anim {
    width: min(92px, 38%);
    aspect-ratio: 1;
    flex-shrink: 0;
}

.ele-img-loader__anim img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 18%;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

body.night-mode .ele-img-loader__anim img {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.ele-img-loader-host:not(.ele-img-loader--loaded) > img {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ele-img-loader-host.ele-img-loader--loaded > img {
    opacity: 1;
}

/* Lazy photo grid cells (background-image via Intersection Observer) */
.pg_wrapper a.js_lazy_bg {
    background-color: rgba(0, 0, 0, 0.04);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body.night-mode .pg_wrapper a.js_lazy_bg {
    background-color: rgba(255, 255, 255, 0.06);
}

/* Stories — hide initial placeholder after Zuck renders */
.ele_home_stories.is-stories-ready .empty_stories {
    display: none !important;
}

/* Profile — banned user overlay on cover (staff view) */
.profile-cover-wrapper--banned {
    position: relative;
}

.profile-cover-wrapper--banned .profile-cover-buttons,
.profile-cover-wrapper--banned .profile-cover-change-loader,
.profile-cover-wrapper--banned .profile-cover-position-loader {
    z-index: 2;
}

.ele_profile_banned_overlay {
    position: absolute;
    inset: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: none;
}

.ele_profile_banned_banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 640px;
    width: 100%;
    padding: 18px 22px;
    border-radius: var(--ele-radius-md, 12px);
    background: rgba(192, 57, 43, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    text-align: left;
    pointer-events: auto;
}

.ele_profile_banned_banner__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ele_profile_banned_banner__body {
    flex: 1;
    min-width: 0;
}

.ele_profile_banned_banner__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.ele_profile_banned_banner__reason {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.96;
    word-break: break-word;
}

.ele_profile_banned_banner__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.88;
}

.ele_profile_banned_banner__meta a {
    color: #fff;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ele_profile_banned_banner__meta a:hover {
    opacity: 0.85;
}

@media (max-width: 575px) {
    .ele_profile_banned_overlay {
        padding: 16px;
    }

    .ele_profile_banned_banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 18px;
    }

    .ele_profile_banned_banner__meta {
        justify-content: center;
    }
}

/* Story viewer — bootstrap modals above zuck (z-index 100000) */
body.modal-open .modal-backdrop {
    z-index: 100001 !important;
}

body.modal-open #modal.modal {
    z-index: 100002 !important;
}

/* Story viewer — head menu (three dots) + desktop close */
#zuck-modal-content .story-viewer .slides-pointers {
    pointer-events: none;
}

#zuck-modal-content .story-viewer .head {
    z-index: 100050 !important;
    pointer-events: auto;
}

#zuck-modal-content .story-viewer.viewing .head .right {
    display: flex;
    align-items: center;
    gap: 4px;
    float: right;
}

#zuck-modal-content .story-viewer.viewing .head .right .close {
    display: none !important;
}

#zuck-modal-content .story-head-menu.ele_post_hdr_menu {
    position: relative;
    z-index: 100060;
    min-width: 22px;
    height: 22px;
}

#zuck-modal-content .story-head-menu .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0;
    color: #fff;
    text-decoration: none;
    opacity: 0.92;
    cursor: pointer;
}

#zuck-modal-content .story-head-menu .dropdown-toggle:hover {
    opacity: 1;
}

#zuck-modal-content .story-head-menu .dropdown-toggle::after {
    display: none;
}

#zuck-modal-content .story-head-menu .dropdown-toggle svg {
    pointer-events: none;
}

#zuck-modal-content .story-head-menu > .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    margin-top: 6px;
    z-index: 100070;
}

#zuck-modal-content .story-head-menu.is-open > .dropdown-menu {
    display: block;
}

#zuck-modal .story-desktop-close {
    display: none;
}

@media (min-width: 992px) {
    #zuck-modal .story-desktop-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 20px;
        right: 24px;
        z-index: 100060;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.45);
        color: #fff;
        font-size: 30px;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
        transition: background 0.2s ease;
    }

    #zuck-modal .story-desktop-close:hover {
        background: rgba(0, 0, 0, 0.62);
    }
}

/* Story viewer — profile link on avatar & name */
#zuck-modal .story-viewer .head .left.js_story-profile-link {
    cursor: pointer;
}

#zuck-modal .story-viewer .head .left.js_story-profile-link .img,
#zuck-modal .story-viewer .head .left.js_story-profile-link strong {
    cursor: pointer;
}

#zuck-modal .story-viewer .head .left.js_story-profile-link:hover strong {
    opacity: 0.85;
}

/* Story viewer — fit image inside frame, scale down if needed */
#zuck-modal-content .story-viewer > .slides > .item {
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #000;
}

#zuck-modal-content .story-viewer .slides .item.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#zuck-modal-content .story-viewer .slides .item > .media {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    left: auto;
    transform: none;
    margin: auto;
}

/* Story viewer — phone format on desktop (9:16, centered)
   Keep zuck 100vw slider math intact; only the visible frame is phone-sized */
@media (min-width: 992px) {
    #zuck-modal {
        --zuck-story-w: min(420px, calc((100vh - 80px) * 9 / 16));
        --zuck-story-h: calc(var(--zuck-story-w) * 16 / 9);
        --zuck-story-top: calc(50vh - var(--zuck-story-h) / 2);
        --zuck-story-left: calc(50vw - var(--zuck-story-w) / 2);
    }

    #zuck-modal-content .story-viewer {
        background: transparent;
    }

    #zuck-modal-content .story-viewer .slides {
        width: var(--zuck-story-w) !important;
        height: var(--zuck-story-h) !important;
        top: var(--zuck-story-top) !important;
        bottom: auto !important;
        left: var(--zuck-story-left) !important;
        right: auto !important;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
        transition: opacity 0.2s ease, filter 0.2s ease;
    }

    #zuck-modal-content .story-viewer.viewing .slides {
        opacity: 1;
        filter: none;
    }

    #zuck-modal-content .story-viewer.previous .slides,
    #zuck-modal-content .story-viewer.next .slides {
        opacity: 0.45;
        filter: brightness(0.7);
    }

    #zuck-modal-content .story-viewer .slides-pointers {
        width: calc(var(--zuck-story-w) - 16px) !important;
        left: calc(var(--zuck-story-left) + 8px) !important;
        right: auto !important;
        top: calc(var(--zuck-story-top) + 10px) !important;
    }

    #zuck-modal-content .story-viewer .head {
        width: var(--zuck-story-w);
        left: var(--zuck-story-left) !important;
        right: auto !important;
        top: calc(var(--zuck-story-top) + 28px) !important;
        background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
        box-sizing: border-box;
    }

    #zuck-modal-content .story-viewer .head .left .info {
        max-width: calc(var(--zuck-story-w) - 120px);
    }

    #zuck-modal-content .story-viewer .tip {
        left: 50% !important;
        bottom: calc(100vh - var(--zuck-story-top) - var(--zuck-story-h) + 24px) !important;
        transform: translateX(-50%);
    }

    #zuck-modal-content .story-viewer .slides-pagination span {
        top: calc(var(--zuck-story-top) + var(--zuck-story-h) / 2);
        transform: translateY(-50%);
        font-size: 36px;
        line-height: 36px;
        width: 44px;
        height: 44px;
        margin: 0;
        background: rgba(0, 0, 0, 0.35);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    #zuck-modal-content .story-viewer .slides-pagination span:hover {
        background: rgba(0, 0, 0, 0.55);
    }

    #zuck-modal-content .story-viewer.viewing .slides-pagination .previous {
        left: calc(var(--zuck-story-left) - 58px);
    }

    #zuck-modal-content .story-viewer.viewing .slides-pagination .next {
        right: calc(100vw - var(--zuck-story-left) - var(--zuck-story-w) - 58px);
    }

    #zuck-modal.rtl #zuck-modal-content .story-viewer.viewing .slides-pagination .previous {
        left: auto;
        right: calc(100vw - var(--zuck-story-left) - var(--zuck-story-w) - 58px);
    }

    #zuck-modal.rtl #zuck-modal-content .story-viewer.viewing .slides-pagination .next {
        right: auto;
        left: calc(var(--zuck-story-left) - 58px);
    }
}

/* Profile avatar — active story ring */
.profile-header.profile .profile-avatar-wrapper.has-active-story {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 3px;
    cursor: pointer;
}

.profile-header.profile .profile-avatar-wrapper.has-active-story img {
    border: 2px solid #fff;
}

body.night-mode .profile-header.profile .profile-avatar-wrapper.has-active-story img {
    border-color: #212121;
}

.profile-avatar-wrapper.has-active-story .dropdown .toggle {
    z-index: 2;
}

/* Stories navigation (elengine_volk — discover, VK-style) */
.js_stories-nav-wrap {
    position: relative;
}

.js_stories-nav-wrap::before,
.js_stories-nav-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 28px;
    width: 56px;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.js_stories-nav-wrap.can-scroll-prev::before {
    left: 0;
    opacity: 1;
    background: linear-gradient(to right, var(--body-bg, #fff) 15%, transparent);
}

.js_stories-nav-wrap.can-scroll-next::after {
    right: 0;
    opacity: 1;
    background: linear-gradient(to left, var(--body-bg, #fff) 15%, transparent);
}

body.night-mode .js_stories-nav-wrap.can-scroll-prev::before {
    background: linear-gradient(to right, var(--body-bg-color-dark, #111) 15%, transparent);
}

body.night-mode .js_stories-nav-wrap.can-scroll-next::after {
    background: linear-gradient(to left, var(--body-bg-color-dark, #111) 15%, transparent);
}

.js_stories-nav {
    position: absolute;
    top: calc(50% - 14px);
    transform: translateY(-50%);
    z-index: 6;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.22);
    padding: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--nova-blue, #2563EB);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2), 0 2px 8px rgba(15, 23, 42, 0.08);
}

body.night-mode .js_stories-nav {
    border-color: transparent;
    background: rgba(30, 41, 59, 0.82);
    color: #fff;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.45);
}

.js_stories-nav-prev {
    left: 6px;
}

.js_stories-nav-next {
    right: 6px;
}

.js_stories-nav-wrap.can-scroll-prev .js_stories-nav-prev,
.js_stories-nav-wrap.can-scroll-next .js_stories-nav-next {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body:not(.night-mode) .js_stories-nav:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--nova-blue-hover, #1D4ED8);
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.32), 0 2px 10px rgba(15, 23, 42, 0.1);
}

body.night-mode .js_stories-nav:hover {
    background: rgba(51, 65, 85, 0.92);
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.28);
}

body:not(.night-mode) .js_stories-nav-next.is-hint {
    animation: stories-nav-hint-light 2s ease-in-out infinite;
}

body.night-mode .js_stories-nav-next.is-hint {
    animation: stories-nav-hint 2s ease-in-out infinite;
}

@keyframes stories-nav-hint-light {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.22);
        border-color: rgba(37, 99, 235, 0.22);
    }
    50% {
        transform: translateY(-50%) translateX(4px);
        box-shadow: 0 8px 32px rgba(37, 99, 235, 0.45);
        border-color: rgba(37, 99, 235, 0.5);
        color: var(--nova-cyan, #22D3EE);
    }
}

@keyframes stories-nav-hint {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    }
    50% {
        transform: translateY(-50%) translateX(4px);
        box-shadow: 0 6px 26px rgba(37, 99, 235, 0.38);
    }
}

/* Stories pagination (elengine_volk — discover) */
.ele_home_stories .js_stories-nav-wrap .js_stories-scroll {
    container-type: inline-size;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-width: 0;
}

.ele_home_stories .js_stories-scroll::-webkit-scrollbar {
    display: none;
}

.ele_home_stories .js_stories-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

/* same slot width as «Моя лента»: 1/7 of viewport row, fixed per scroll container */
.ele_home_stories .js_stories-scroll #stories {
    flex: 0 0 auto;
    min-width: 100%;
    width: max-content;
}

.ele_home_stories .js_stories-scroll #stories > .story,
.ele_home_stories .js_stories-scroll #stories > .create_story {
    flex: 0 0 14.2857143cqw;
    width: 14.2857143cqw;
    min-width: 14.2857143cqw;
    max-width: 14.2857143cqw;
    box-sizing: border-box;
}

.js_stories-skeletons {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    width: max-content;
}

.story_skeleton {
    flex: 0 0 14.2857143cqw;
    width: 14.2857143cqw;
    min-width: 14.2857143cqw;
    max-width: 14.2857143cqw;
    padding: 0 7.5px;
    box-sizing: border-box;
    animation: nova-story-skeleton-in 0.35s ease both;
}

.story_skeleton__avatar {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body.night-mode .story_skeleton__avatar {
    background: rgba(255, 255, 255, 0.06);
}

.story_skeleton__nova {
    width: 42%;
    height: 42%;
    display: block;
    border-radius: 18%;
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.22);
}

body.night-mode .story_skeleton__nova {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
}

.story_skeleton__label {
    height: 20px;
    margin: 20px 20px 0;
    border-radius: 5px;
    background: linear-gradient(
        90deg,
        rgba(34, 211, 238, 0.08) 0%,
        rgba(37, 99, 235, 0.16) 50%,
        rgba(34, 211, 238, 0.08) 100%
    );
    background-size: 200% 100%;
    animation: nova-story-shimmer 1.4s ease-in-out infinite;
}

body.night-mode .story_skeleton__label {
    background: linear-gradient(
        90deg,
        rgba(34, 211, 238, 0.06) 0%,
        rgba(37, 99, 235, 0.14) 50%,
        rgba(34, 211, 238, 0.06) 100%
    );
    background-size: 200% 100%;
}

@keyframes nova-story-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes nova-story-skeleton-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 1250px) {
    .ele_home_stories .js_stories-scroll #stories > .story,
    .ele_home_stories .js_stories-scroll #stories > .create_story,
    .story_skeleton {
        flex-basis: 16.6666667cqw;
        width: 16.6666667cqw;
        min-width: 16.6666667cqw;
        max-width: 16.6666667cqw;
    }
}

@media (max-width: 1200px) {
    .ele_home_stories .js_stories-scroll #stories > .story,
    .ele_home_stories .js_stories-scroll #stories > .create_story,
    .story_skeleton {
        flex-basis: 14.2857143cqw;
        width: 14.2857143cqw;
        min-width: 14.2857143cqw;
        max-width: 14.2857143cqw;
    }
}

@media (max-width: 1050px) {
    .ele_home_stories .js_stories-scroll #stories > .story,
    .ele_home_stories .js_stories-scroll #stories > .create_story,
    .story_skeleton {
        flex-basis: 16.6666667cqw;
        width: 16.6666667cqw;
        min-width: 16.6666667cqw;
        max-width: 16.6666667cqw;
    }
}

@media (max-width: 900px) {
    .ele_home_stories .js_stories-scroll #stories > .story,
    .ele_home_stories .js_stories-scroll #stories > .create_story,
    .story_skeleton {
        flex-basis: 20cqw;
        width: 20cqw;
        min-width: 20cqw;
        max-width: 20cqw;
    }
}

/* --- Jobs page (market-style) --- */
.ele_jobs_toolbar {
    padding: 8px !important;
    margin-bottom: 16px !important;
    border: 1px solid var(--ele-gray-border) !important;
    border-radius: 12px !important;
}

body.night-mode .ele_jobs_toolbar {
    border-color: var(--ele-gray-border) !important;
}

.ele_jobs_toolbar_row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ele_jobs_toolbar_item {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px !important;
    border-radius: 10px !important;
    background: var(--ele-gray-input) !important;
    color: #333 !important;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.ele_jobs_toolbar_item > span:not(.ele_jobs_sort_inner):not(.ele_jobs_sort_label):not(.ele_jobs_sort_value) {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

body.night-mode .ele_jobs_toolbar_item {
    background: #2a2c2d !important;
    color: #e9ecef !important;
}

.ele_jobs_toolbar_item svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.ele_jobs_chevron {
    opacity: 0.45;
    margin-left: 2px;
}

.ele_jobs_search_form {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin: 0;
}

.ele_jobs_search_form .el_prof_search_bar {
    width: 100%;
}

.ele_jobs_search_form .el_prof_search_input {
    padding-right: 16px !important;
}

.ele_jobs_sort {
    flex-shrink: 0;
}

.ele_jobs_sort_btn {
    min-width: 200px;
    max-width: none;
    text-align: left;
}

.ele_jobs_sort_inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    min-width: 0;
}

.ele_jobs_sort_label {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.55;
}

.ele_jobs_sort_value {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.ele_jobs_create_btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.ele_jobs_loader {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.js_jobs-stream.is-loading {
    min-height: 120px;
    opacity: 0.55;
    pointer-events: none;
}

.js_jobs-results.is-loading {
    min-height: 120px;
}

.ele_jobs_types_menu {
    max-height: 420px;
    overflow: hidden;
}

.ele_jobs_types_menu .js_scroller {
    max-height: 320px;
    overflow-y: auto;
}

@media (max-width: 991px) {
    .ele_jobs_toolbar_row {
        flex-wrap: wrap;
    }

    .ele_jobs_search_form {
        order: 10;
        flex: 1 1 100%;
    }

    .ele_jobs_sort_btn {
        min-width: 0;
    }
}

@media (max-width: 575px) {
    .ele_jobs_create_btn span {
        display: none;
    }

    .ele_jobs_create_btn {
        padding: 0 12px !important;
    }
}

/* --- Settings page --- */
.ele_sett_page {
    margin-left: 0 !important;
}

.ele_sett_side {
    position: static !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    z-index: auto !important;
    border-radius: var(--ele-radius-lg) !important;
    box-shadow: none !important;
}

.ele_sett_side .ele_page_title.small {
    padding: 4px 12px 8px;
    margin: 0 0 4px !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #888;
}

body.night-mode .ele_sett_side .ele_page_title.small {
    color: #aaa;
}

.ele_sett_side .side-nav {
    margin: 0;
    padding: 0;
}

.ele_sett_side .side-nav a,
.ele_sett_side .side-nav .static {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Gilroy', Roboto, sans-serif;
    color: #525252;
    transition: background-color 0.18s ease, color 0.18s ease;
}

body.night-mode .ele_sett_side .side-nav a,
body.night-mode .ele_sett_side .side-nav .static {
    color: #c6c6c6;
}

.ele_sett_side .side-nav a:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.04);
}

body.night-mode .ele_sett_side .side-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.ele_sett_side .side-nav a svg {
    margin: 0 12px 0 0;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.ele_sett_side .side-nav > li.active > a {
    color: var(--main-link);
    font-weight: 600;
}

.ele_sett_side .side-nav > li.active > a:before {
    border-radius: 10px;
    opacity: 0.12;
}

body.night-mode .ele_sett_side .side-nav > li.active > a:before {
    opacity: 0.16;
}

.ele_sett_side .side-nav ul a {
    margin-left: 0;
    padding: 8px 12px 8px 36px;
    min-height: 40px;
    border-left: 0;
    font-size: 13px;
    font-weight: 500;
}

@media (min-width: 993px) {
    .ele_sett_side {
        position: sticky !important;
        top: 72px;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }
}

@media (min-width: 1200px) {
    body:has(.ele_sidebar_left) .ele_sett_page > .row {
        flex-wrap: nowrap;
        gap: 16px;
        margin-left: 0;
        margin-right: 0;
    }

    body:has(.ele_sidebar_left) .ele_sett_page .ele_sett_nav_col {
        flex: 0 0 var(--ele-sidebar-w);
        max-width: var(--ele-sidebar-w);
        padding-left: 5px;
        padding-right: 0;
    }

    body:has(.ele_sidebar_left) .ele_sett_page .ele_sett_content_col {
        flex: 1 1 0;
        max-width: none;
        padding-left: var(--ele-content-inset);
        padding-right: 0;
    }
}

/* --- Nova rules static page --- */
.nova-rules-page {
    max-width: 920px;
}

.nova-rules {
    color: var(--body-color, #212529);
    font-size: 15px;
    line-height: 1.65;
}

body.night-mode .nova-rules {
    color: #e9ecef;
}

.nova-rules__lead {
    margin: 0 0 24px;
    padding: 16px 18px;
    border-radius: var(--ele-radius-lg, 12px);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
    border: 1px solid rgba(37, 99, 235, 0.14);
}

body.night-mode .nova-rules__lead {
    background: linear-gradient(135deg, rgba(15, 51, 71, 0.55) 0%, rgba(22, 54, 114, 0.45) 100%);
    border-color: rgba(56, 189, 248, 0.18);
}

.nova-rules__toc {
    margin: 0 0 32px;
    padding: 18px 20px;
    border-radius: var(--ele-radius-lg, 12px);
    background: var(--ele-gray-surface, #f8f9fa);
    border: 1px solid var(--ele-gray-border, #e9ecef);
}

body.night-mode .nova-rules__toc {
    background: #1e2021;
    border-color: #2f3234;
}

.nova-rules__toc-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--nova-blue, #2563EB);
}

body.night-mode .nova-rules__toc-title {
    color: var(--nova-sky, #38BDF8);
}

.nova-rules__toc-list {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 28px;
}

.nova-rules__toc-list a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nova-rules__toc-list a:hover {
    color: var(--nova-blue, #2563EB);
    border-bottom-color: currentColor;
}

body.night-mode .nova-rules__toc-list a:hover {
    color: var(--nova-sky, #38BDF8);
}

.nova-rules__section {
    margin-bottom: 36px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ele-gray-border, #e9ecef);
}

body.night-mode .nova-rules__section {
    border-bottom-color: #2f3234;
}

.nova-rules__section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.nova-rules__heading {
    margin: 0 0 16px;
    font-family: 'Gilroy', Roboto, sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--nova-navy, #102A5C);
}

body.night-mode .nova-rules__heading {
    color: #f1f5f9;
}

.nova-rules__subheading {
    margin: 20px 0 10px;
    font-size: 16px;
    font-weight: 700;
}

.nova-rules__list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    counter-reset: nova-rule;
}

.nova-rules__list > li {
    position: relative;
    margin: 0 0 14px;
    padding: 14px 16px 14px 18px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

body.night-mode .nova-rules__list > li {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.nova-rules__list > li:last-child {
    margin-bottom: 0;
}

.nova-rules__sub {
    margin: 10px 0 0;
}

.nova-rules__bullets {
    margin: 8px 0 0;
    padding-left: 22px;
}

.nova-rules__bullets li {
    margin-bottom: 6px;
}

.nova-rules__bullets li:last-child {
    margin-bottom: 0;
}

.nova-rules code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.92em;
}

body.night-mode .nova-rules code {
    background: rgba(56, 189, 248, 0.12);
}

.nova-rules__formula {
    display: inline-block;
    margin: 10px 0 0;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    background: var(--nova-btn-gradient);
    color: #fff;
}

.nova-rules__table-wrap {
    overflow-x: auto;
    margin: 16px 0 20px;
    border-radius: 12px;
    border: 1px solid var(--ele-gray-border, #e9ecef);
}

body.night-mode .nova-rules__table-wrap {
    border-color: #2f3234;
}

.nova-rules__table {
    width: 100%;
    min-width: 720px;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.nova-rules__table th,
.nova-rules__table td {
    padding: 12px 14px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid var(--ele-gray-border, #e9ecef);
}

body.night-mode .nova-rules__table th,
body.night-mode .nova-rules__table td {
    border-bottom-color: #2f3234;
}

.nova-rules__table tbody tr:last-child td {
    border-bottom: 0;
}

.nova-rules__table thead th {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--nova-navy, #102A5C);
}

body.night-mode .nova-rules__table thead th {
    background: linear-gradient(135deg, rgba(15, 51, 71, 0.8) 0%, rgba(22, 54, 114, 0.7) 100%);
    color: #e2e8f0;
}

.nova-rules__table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}

body.night-mode .nova-rules__table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.nova-rules__table td:first-child {
    width: 44px;
    font-weight: 700;
    color: var(--nova-blue, #2563EB);
    white-space: nowrap;
}

body.night-mode .nova-rules__table td:first-child {
    color: var(--nova-sky, #38BDF8);
}

.nova-rules__note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    border-left: 4px solid var(--nova-blue, #2563EB);
    background: rgba(37, 99, 235, 0.06);
}

body.night-mode .nova-rules__note {
    border-left-color: var(--nova-sky, #38BDF8);
    background: rgba(56, 189, 248, 0.08);
}

.nova-rules__contacts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 20px;
}

.nova-rules__contact-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--ele-gray-surface, #f8f9fa);
    border: 1px solid var(--ele-gray-border, #e9ecef);
}

body.night-mode .nova-rules__contact-card {
    background: #1e2021;
    border-color: #2f3234;
}

.nova-rules__contact-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6c757d;
}

body.night-mode .nova-rules__contact-label {
    color: #9aa0a6;
}

.nova-rules__contact-card a {
    font-weight: 600;
    color: var(--nova-blue, #2563EB);
    word-break: break-word;
}

body.night-mode .nova-rules__contact-card a {
    color: var(--nova-sky, #38BDF8);
}

.nova-rules__legal {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 14px;
}

body.night-mode .nova-rules__legal {
    background: rgba(255, 255, 255, 0.04);
}

.nova-rules__legal p {
    margin: 0 0 4px;
}

.nova-rules__legal p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .nova-rules__toc-list {
        columns: 1;
    }

    .nova-rules__contacts {
        grid-template-columns: 1fr;
    }

    .nova-rules__heading {
        font-size: 20px;
    }
}

@media (max-width: 992px) {
    .ele_sett_page .ele_sett_nav_col {
        margin-top: 16px;
    }

    .ele_sett_page .ele_sett_content_col {
        padding-left: 10px;
        padding-right: 10px;
    }
}
