* {
    font-family: 'Inter';
    box-sizing: border-box;
    margin: 0;
}

:root {
    --c-grey-100: #f4f6f8;
    --c-grey-200: #e3e3e3;
    --c-grey-300: #b2b2b2;
    --c-grey-400: #7b7b7b;
    --c-grey-500: #3d3d3d;

    --c-blue-500: #688afd;

    /* Интро: базовые значения (медиазапросы ниже их переопределяют) */
    --intro-letter:       0.42em;
    --intro-letter-start: 0.7em;
    --intro-font-min:     26px;
}

/* ===== #0 — ЗАГРУЗОЧНЫЙ ЭКРАН ===== */
#intro-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #060810;
    font-family: 'Cormorant Garamond', serif;
    animation: introOut 1.4s cubic-bezier(0.4,0,0.6,1) 4.0s forwards;
    pointer-events: all;
}
@keyframes introOut {
    to { opacity: 0; pointer-events: none; }
}
#intro-screen #rays {
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
    filter: blur(5px);
}
#intro-screen .stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
#intro-screen .logo-wrap {
    opacity: 0;
    filter: blur(18px) brightness(2.5);
    transform: scale(0.88);
    animation: logoEmerge 2.2s cubic-bezier(0.4,0,0.2,1) 0.4s forwards;
}
#intro-screen .logo-wrap img { height: 128px; }
@keyframes logoEmerge {
    0%   { opacity: 0; filter: blur(18px) brightness(2.5); transform: scale(0.88); }
    40%  { opacity: 0.8; filter: blur(5px) brightness(1.5); transform: scale(0.97); }
    100% { opacity: 1; filter: blur(0px) brightness(1); transform: scale(1); }
}
#intro-screen .divider {
    width: 0; height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(162,196,240,0.4) 30%,
        rgba(82,134,255,0.6) 50%,
        rgba(162,196,240,0.4) 70%,
        transparent);
    box-shadow: 0 0 8px rgba(82,134,255,0.3);
    animation: lineGrow 1.2s cubic-bezier(0.4,0,0.2,1) 2.0s forwards;
}
@keyframes lineGrow { to { width: min(360px, 50vw); } }
#intro-screen .title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(var(--intro-font-min, 26px), 4.5vw, 56px);
    font-weight: 300;
    color: #dce8f8;
    letter-spacing: var(--intro-letter, 0.42em);
    text-transform: uppercase;
    opacity: 0;
    max-width: 100%;
    animation: wordReveal 2s ease 1.6s forwards;
}
@keyframes wordReveal {
    0%   { opacity: 0; letter-spacing: var(--intro-letter-start, 0.7em); filter: blur(6px); }
    100% { opacity: 1; letter-spacing: var(--intro-letter, 0.42em); filter: blur(0); }
}
#intro-screen .sub {
    font-family: 'Cormorant', serif;
    font-style: italic;
    font-size: clamp(11px, 1.1vw, 14px);
    color: rgba(162,196,240,0.38);
    letter-spacing: 0.55em;
    opacity: 0;
    animation: subReveal 2s ease 2.6s forwards;
}
@keyframes subReveal {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}
/* Адаптив интро */
@media (max-width: 600px) {
    :root { --intro-letter: 0.22em; --intro-letter-start: 0.45em; --intro-font-min: 22px; }
    #intro-screen .logo-wrap img { height: 72px; }
    #intro-screen .stage { gap: 12px; }
}
@media (max-width: 380px) {
    :root { --intro-letter: 0.1em; --intro-letter-start: 0.28em; --intro-font-min: 20px; }
    #intro-screen .logo-wrap img { height: 56px; }
}

/* ===== #9 — ПЕРЕМЕННЫЕ ТЕМЫ ===== */
:root {
    --bg-main:     rgba(35,41,55,0.99);
    --bg-sidebar:  rgba(35,41,55,0.99);
    --bg-card:     rgb(22,27,43);
    --text-main:   #ffffff;
    --text-muted:  rgba(255,255,255,0.5);
    --border:      rgba(255,255,255,0.08);
    --bg-hover:    rgba(255,255,255,0.05);
    --bg-active:   rgba(35,41,55,0.99);
    --input-bg:    rgba(35,41,55,0.99);
    --input-border: rgba(255,255,255,0.25);
    --label-color: rgba(255,255,255,0.7);
    --btn-bg:      rgba(255,255,255,0.09);
    --btn-hover-bg: rgba(255,255,255,0.15);
}
[data-theme="light"] {
    --bg-main:      #ffffff;
    --bg-sidebar:   #ffffff;
    --bg-card:      #f0f1f5;
    --text-main:    #1c1e2a;
    --text-muted:   rgba(28,30,42,0.48);
    --border:       rgba(0,0,0,0.06);
    --bg-hover:     rgba(82,134,255,0.07);
    --bg-active:    rgba(82,134,255,0.12);
    --input-bg:     #ffffff;
    --input-border: rgba(0,0,0,0.12);
    --label-color:  rgba(28,30,42,0.55);
    --btn-bg:       #ffffff;
    --btn-hover-bg: rgba(82,134,255,0.08);
}

/* Анимация перехода темы */
html { transition: background 0.3s ease; }
.container-data, .comment { transition: background 0.3s ease, color 0.3s ease; }
.category-item, .form-control, .date-view,
.form-label, .link, .fade-text:after, .border-left, .button { transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease; }

html {
    background: var(--bg-main, rgba(35, 41, 55, 0.99));
    color: var(--text-main, white);
    /* #10 — Parallax */
    background-attachment: fixed;
    background-size: cover;
}

.container{
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* ===== SIDEBAR ===== */

.w-15 {
    width: 15%;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.w-85 {
    width: 85%;
}

.h-100vh {
    height: calc(100vh - 1em - 1em - 1em);
}

/* Brand block */
.left-logo.sidebar-brand {
    flex-direction: row;
    align-items: center;
    padding: 20px 14px;
    gap: 12px;
    color: inherit;
    border-bottom: none;
}

.sidebar-logo-img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(82,134,255,0.18) 0%, rgba(82,134,255,0.06) 100%);
    border: 1px solid rgba(82,134,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    padding: 8px;
    flex-shrink: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .w-15 {
    border-right: none;
    box-shadow: 2px 0 16px rgba(0,0,0,0.06);
    z-index: 2;
}
[data-theme="light"] .menu-item {
    color: rgba(28,30,42,0.6);
    border-left-color: transparent;
}
[data-theme="light"] .menu-item:hover {
    color: #1c1e2a;
    background: rgba(82,134,255,0.06);
}
[data-theme="light"] .menu-item.active {
    color: #3b6ff0;
    background: rgba(82,134,255,0.10);
    border-left-color: #3b6ff0;
    font-weight: 600;
}
[data-theme="light"] .sidebar-divider {
    background: rgba(0,0,0,0.06);
}
[data-theme="light"] .left-footer {
    color: rgba(28,30,42,0.35);
}

.sidebar-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* .left-logo img — старый img убран из HTML, правило удалено */

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.left-logo--title {
    color: #3a6ae0;
    font-size: clamp(15px, 1.4vw, 22px);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-left: 0;
    padding-top: 0;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    transition: color 0.3s ease;
}

.sidebar-brand-sub {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.7;
    transition: color 0.3s ease;
}

/* Separator */
.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0 20px 16px;
    transition: background 0.3s ease;
}

/* Container flex grows to push footer down */
.w-15 .container.pl-0 {
    flex: 1;
    padding-top: 0;
    overflow: hidden;
}

/* Navigation items */
.menu-item {
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    color: var(--text-muted, rgba(255,255,255,0.6));
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 9px;
    border-left: 2px solid transparent;
    border-right: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.menu-item i {
    margin-right: 10px;
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.menu-item.active {
    background: var(--bg-active);
    color: var(--text-main);
    border-left-color: #5286FF;
    border-right: none;
    font-weight: 600;
}

/* mb-3 inside sidebar — tighter */
.w-15 .mb-3 {
    margin-bottom: 4px;
    padding: 0 12px;
}

/* Footer section */
.sidebar-footer-section {
    padding: 16px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.left-footer {
    position: static;
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0.5;
    text-align: center;
    padding: 0 16px;
    transition: color 0.3s ease;
}

/* Theme toggle pill */
.theme-toggle-track {
    display: flex;
    align-items: center;
    gap: 9px;
}

.theme-icon {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1;
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0.35;
    user-select: none;
}

/* Active icon: sun=light mode, moon=dark mode (current state indicator) */
[data-theme="light"]            .theme-icon.sun  { opacity: 1; color: var(--text-main); }
html:not([data-theme="light"]) .theme-icon.moon { opacity: 1; color: var(--text-main); }

.theme-toggle-pill {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: rgba(82,134,255,0.15);
    border-color: rgba(82,134,255,0.35);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
    outline: none;
}

.theme-toggle-pill::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #5286FF;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    /* DEFAULT = dark mode: dot on RIGHT (under moon ☾) */
    transform: translateX(20px);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

/* Light mode: dot on LEFT (under sun ☀) */
[data-theme="light"] .theme-toggle-pill {
    background: #eef0f5;
    border-color: rgba(0,0,0,0.08);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .theme-toggle-pill::after {
    transform: translateX(0);
    background: #3b6ff0;
    box-shadow: 0 1px 4px rgba(59,111,240,0.35);
}

.theme-toggle-pill:hover {
    border-color: #5286FF;
    background: rgba(82,134,255,0.15);
}

.theme-toggle-pill:hover::after {
    box-shadow: 0 0 0 3px rgba(82,134,255,0.15), 0 1px 4px rgba(0,0,0,0.35);
}

.container-data {
    background: var(--bg-card, rgb(22,27,43));
    padding: 0 25px 0 0;
    border-radius: 13px;
    margin-right: 25px;
    height: calc(100vh - 50px);
    border: 1px solid var(--border, #3d3d3d);
}

.pl-0 {
    padding-left: 0!important;
}

/* .left-logo img — устаревшее правило удалено */

/* .left-footer absolute — устаревшее правило удалено, заменено в sidebar-footer-section */

.category-image img {
    height: 45px;
    width: 45px;
    border-radius: 50%;
}

.category-item {
    display: flex;
    cursor: pointer;
    padding: 7px 25px 7px 25px;
    border-bottom: 1px solid var(--border, #333);
    transition: background 0.2s ease, transform 0.2s ease,
                border-left-color 0.2s ease;
    border-left: 3px solid transparent;
}

.category-item:hover {
    background: var(--bg-hover, rgba(35,41,55,0.99));
    transform: translateX(5px);
    border-left-color: #5286FF;
}

.category-item.active {
    border-left-color: #5286FF;
    background: var(--bg-active, rgba(35,41,55,0.99));
}

.category-item--data {
    margin-left: 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 7px 0;
    width: calc(100% - 45px);
}

.category-title {
    font-weight: 500;
    font-size: 15px;
}

.category-text {
    font-size: 11px;
    max-height: 11px;
    overflow: hidden;
    line-height: 11px;
}

.category-date {
    font-size: 9px;
    text-align: right;
}

.chats-list {
    height: 100%;
    max-height: calc(100vh - 51px);
    overflow-x: hidden;
    overflow-y: auto;
}


a {
    color: inherit;
}
img {
    display: block;
    max-width: 100%;
}

.timeline {
    width: 85%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    padding: 32px 0 32px 43.95px;
    border-left: 2px solid var(--border, #333);
    font-size: 1.125rem;
}

.timeline-item {
    display: flex;
    gap: 24px;
    & + * {
        margin-top: 24px;
    }
    & + .extra-space {
        margin-top: 48px;
    }
}

.new-comment {
    width: 100%;
    input {
        border: 1px solid var(--c-grey-200);
        border-radius: 6px;
        height: 48px;
        padding: 0 16px;
        width: 100%;
        &::placeholder {
            color: var(--c-grey-300);
        }

        &:focus {
            border-color: var(--c-grey-300);
            outline: 0; // Don't actually do this
        box-shadow: 0 0 0 4px var(--c-grey-100);
        }
    }
}

.timeline-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-left: -52px;
    flex-shrink: 0;
    overflow: initial; /* было hidden */
    /* box-shadow: 0 0 0 6px #fff; */
    svg {
        width: 20px;
        height: 20px;
    }

    &.faded-icon {
        /* background-color: var(--c-grey-100);
        color: var(--c-grey-400);*/
    }

    &.filled-icon {
        /* background-color: #e7e7e7;
        color: #000; */
    }
}

.timeline-item-description {
    display: flex;
    padding-top: 6px;
    gap: 8px;
    color: var(--c-grey-400);

    img {
        flex-shrink: 0;
    }
    a {
        color: var(--c-grey-500);
        font-weight: 500;
        text-decoration: none;
        &:hover,
        &:focus {
            outline: 0; // Don't actually do this
        color: var(--c-blue-500);
        }
    }
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    &.small {
        width: 28px;
        height: 28px;
    }

    img {
        object-fit: cover;
    }
}

.comment {
    border-radius: 10px;
    padding: 16px;
    font-size: 1rem;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    color: var(--text-main, inherit);
}
[data-theme="light"] .comment {
    background: #f0f1f5;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: none;
}
[data-theme="light"] .container-data {
    background: transparent;
    border-color: transparent;
}
[data-theme="light"] .w-29 {
    background: #f0f1f5;
    border-radius: 14px;
    box-shadow: none;
    margin: 0;
    border-right: none;
}
[data-theme="light"] .w-71 {
    background: transparent;
}
[data-theme="light"] .chats-list {
    background: transparent;
    border-right: none;
}
[data-theme="light"] .category-item {
    border-radius: 10px;
    margin: 2px 8px;
    padding: 7px 16px;
    border-left: none;
}
[data-theme="light"] .category-item:hover {
    background: rgba(82,134,255,0.06);
    box-shadow: none;
    transform: none;
    border-left-color: transparent;
}
[data-theme="light"] .category-item.active {
    background: rgba(82,134,255,0.10);
    border-left-color: transparent;
    box-shadow: 0 1px 4px rgba(82,134,255,0.12);
}
[data-theme="light"] .category-item.active .category-title {
    color: #3b6ff0;
    font-weight: 600;
}
[data-theme="light"] .timeline-item-icon .pulse {
    background: #3b6ff0;
    box-shadow: 0 0 6px rgba(59,111,240,0.35);
}
[data-theme="light"] .count-view {
    color: rgba(28,30,42,0.4);
}
[data-theme="light"] .date-view {
    color: rgba(28,30,42,0.35);
}

.button {
    border: 0;
    display: inline-flex;
    vertical-align: middle;
    margin-right: 4px;
    margin-top: 12px;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    height: 32px;
    padding: 0 17px;
    background-color: var(--btn-bg, var(--c-grey-100));
    color: var(--text-main, inherit);
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 7px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;

    &:hover {
        background-color: var(--btn-hover-bg, var(--c-grey-200));
        box-shadow: 0 0 0 2px rgba(82,134,255,0.25),
                    0 2px 10px rgba(82,134,255,0.15);
    }

    &.square {
        border-radius: 50%;
        color: var(--c-grey-400);
        width: 32px;
        height: 32px;
        padding: 0;
        svg {
            width: 24px;
            height: 24px;
        }

        &:hover {
            background-color: var(--c-grey-200);
            color: var(--c-grey-500);
        }
    }
}

.show-replies {
    color: var(--c-grey-300);
    background-color: transparent;
    border: 0;
    padding: 0;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    cursor: pointer;
    svg {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
    }

    &:hover,
    &:focus {
        color: var(--c-grey-500);
    }
}

.avatar-list {
    display: flex;
    align-items: center;
    & > * {
        position: relative;
        box-shadow: 0 0 0 2px var(--bg-card, #fff);
        margin-right: -8px;
    }
}

.pl-51px {
    padding-left: 51px;
}

.border-left {
    border-left: 1px solid var(--border, #333);
}

.w-29 {
    width: 29%;
}

.w-71 {
    width: 71%;
}

.count-view i {
    color: #5286FF;
    margin-right: 3px;
}

.chat-data {
    height: calc(100vh - 51px);
    max-height: calc(100vh - 51px);
    overflow-x: hidden;
    overflow-y: auto;
}

.count-view {
    font-size: 11px;
}

h3 {
    font-size: 17px;
}

.date-view {
    font-size: 11px;
    color: var(--text-muted, #ccc);
}

.fade-text {
    position: relative;
    overflow: hidden;
    max-height: 39px;
}

.fade-text:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 39px;
    background: linear-gradient(360deg, var(--bg-card, rgba(35,41,55,0.99)), rgba(255,255,255,0));
}

.icon-type {
    display: flex;
    align-items: center;
    color: #5286FF;
    font-size: 13px;
}

.icon-type i {
    margin-right: 5px;
}

.spinner-controller {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: radial-gradient(farthest-side,#5286ff 94%,#0000) top/9px 9px no-repeat,
    conic-gradient(#0000 30%,#5286ff);
    -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 9px),#000 0);
    animation: spinner-c7wet2 1s infinite linear;
}

@keyframes spinner-c7wet2 {
    100% {
        transform: rotate(1turn);
    }
}

.p-controller {
    padding: 25px 35px;
}

.form-label {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 15px;
    color: var(--label-color, rgba(255,255,255,0.7));
}

.form-control {
    border: 1px solid var(--input-border, #535353);
    width: 100%;
    font-size: 1em;
    padding: .5em .75em;
    background: var(--input-bg, rgba(35,41,55,0.99));
    border-radius: 9px;
    color: var(--text-main, white);
}

.link {
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main, white);
}

.link-danger {
    color: #ff3a3a;
}

.link-danger:hover {
    color: red;
}

.t-d-underline {
    text-decoration: underline;
}

.lock-chat--icon {
    font-size: 55px;
    color: var(--text-muted, #999);
}

.lock-chat--title {
    font-size: 19px;
    color: var(--text-muted, #999);
}

.link {
    color: #3373ff;
    transition-duration: .15s;
}

.link:hover {
    color: rgba(51, 115, 255, 0.63);
}

.timer {
    display: grid;
    grid-template-columns: 3.5rem 0.5rem 3.5rem 0.5rem 3.5rem 0.5rem 3.5rem;
    font-size: 1.95rem;
    justify-items: center;
}

.timer__item {
    position: relative;
}

.timer__item::before {
    content: attr(data-title);
    display: block;
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: var(--text-muted, #b5b5b5);
}

.timer-title {
    color: var(--text-muted, #ccc);
    font-size: 15px;
}

.button.mt-0 {
    margin-top: 0!important;
}

.button.h-100 {
    height: auto;
}

.button:disabled {
    background-color: #cccccc;
}

.form-control.error {
    border-color: red;
}

.text-red {
    color: red;
}

.link-danger {
    color: red!important;
}

.publication-description {
    white-space: pre-wrap;
}

.checkbox-input {
    appearance: none;
    -webkit-appearance: none;
}

.checkbox-input {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid #0d6efd;
    border-radius: 0.25rem;
    background-color: #fff;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-right: 9px!important;
}

.checkbox-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.checkbox-input:active {
    filter: brightness(90%);
}

.checkbox-input:hover:not(:disabled) {
    border-color: #0d6efd;
}

.checkbox-input:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.checkbox-input:disabled {
    filter: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-input:disabled ~ .checkbox-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-image-preview img {
    height: 95px;
    width: 95px;
    border-radius: 15px;
    object-fit: cover;
}

.gap-15px {
    gap: 15px;
}

.title-hide {
    background: rgba(166, 166, 166, 0.51);
    display: block;
    border-radius: 3px;
    width: 55%;
    height: 15px;
}

.block-icon {
    font-size: 41px;
    color: var(--text-muted, #ccc);
}

/* .left-logo--title — устаревшее правило удалено, заменено в блоке sidebar */

.pulse {
    position: relative;
    text-align: center;
    padding: 5px;
    border-radius: 50%;
    background: #5286FF;
    box-shadow: 0 0 8px rgba(82,134,255,0.5);
    width: 15px;
    height: 15px;
}

.pulse::after,
.pulse::before {
    content: '';
    position: absolute;
    border: 2px solid #5286FF;
    left: -7px;
    opacity: 0;
    right: -7px;
    top: -7px;
    bottom: -7px;
    border-radius: 50%;
    animation: pulse 2.2s ease-in-out infinite;
}

.pulse::after {
    animation-delay: 1.25s;
}

@keyframes pulse {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Back button: hidden globally, JS shows it only on mobile via .show() */
.back-btn-mobile { display: none; }

/* ===== MOBILE ADAPTATION ===== */

/* Tablet + Mobile (≤ 1024px): sidebar → horizontal top nav */
@media (max-width: 1024px) {

    /* Основной layout: sidebar сверху, контент снизу */
    .flex.mt-5.mb-3 {
        flex-direction: column;
        margin-top: 0;
    }

    /* Sidebar → горизонтальный топбар */
    .w-15 {
        width: 100%;
        height: auto !important;
        min-height: 54px;
        margin-left: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
        flex-direction: row;
        align-items: center;
        padding: 0 12px;
        flex-wrap: nowrap;
    }

    /* Container: строка, занимает всё свободное место */
    .w-15 .container.pl-0 {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 0 !important;
        overflow: visible;
        min-width: 0;
    }

    /* Бренд блок: компактный */
    .w-15 .left-logo.sidebar-brand {
        padding: 8px 0;
        gap: 8px;
        flex-shrink: 0;
        margin-right: 8px;
    }

    .w-15 .sidebar-logo-img {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        padding: 4px;
        margin-bottom: 0;
    }

    .w-15 .left-logo--title { font-size: 13px; }

    /* Разделитель: скрыть */
    .w-15 .sidebar-divider { display: none; }

    /* Обёртки nav-пунктов */
    .w-15 .mb-3 { margin-bottom: 0; padding: 0; }

    /* Пункты меню: компактные таб-кнопки */
    .w-15 .menu-item {
        font-size: 13px;
        padding: 6px 10px;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 7px;
        white-space: nowrap;
    }
    .w-15 .menu-item.active {
        border-left: none;
        border-bottom: 2px solid #5286FF;
        background: var(--bg-active);
    }

    /* Footer: только переключатель, без рамки и отступов */
    .sidebar-footer-section {
        flex-direction: row;
        padding: 0;
        border-top: none;
        gap: 8px;
        flex-shrink: 0;
    }

    .left-footer { display: none; }

    .w-85 { width: 100%; margin-right: 0; }

    .container-data {
        height: auto;
        min-height: calc(100vh - 60px);
        border-radius: 0;
        margin-right: 0;
        padding-right: 0;
        border-left: none;
        border-right: none;
    }

    .chats-list { height: auto; max-height: none; }
    .chat-data { height: auto; max-height: none; }
}

/* Маленький экран ≤480px: скрыть текст логотипа */
@media (max-width: 480px) {
    .w-15 .left-logo--title { display: none; }
    .w-15 .menu-item { font-size: 12px; padding: 5px 8px; }
    .theme-icon { font-size: 11px; }
}

/* Очень маленький экран ≤360px: убрать иконки солнца/луны, компактнее меню */
@media (max-width: 360px) {
    .theme-icon { display: none; }
    .w-15 .menu-item { font-size: 11px; padding: 4px 5px; }
    .w-15 .sidebar-logo-img { width: 26px; height: 26px; border-radius: 7px; padding: 3px; }
}

/* Mobile only (≤ 768px): stack inner panels */
@media (max-width: 768px) {

    /* Allow only containers inside .container-data to wrap */
    .container-data .flex { flex-wrap: wrap; }

    .w-29 { width: 100%; }
    .w-71 { width: 100%; }

    .chats-list { overflow-x: hidden; }

    .pl-51px { padding-left: 10px; }
    .border-left { border-left: none; }

    /* Panel switching — JS toggles these classes */
    .chats-list.hidden-mobile { display: none !important; }
    .chat-data.full-width { width: 100% !important; }

    /* Timeline */
    .timeline {
        width: 100%;
        max-width: 100%;
        padding-left: 28px;
        font-size: 0.9rem;
    }

    /* Recalculate icon offset for new padding-left: 28px */
    .timeline-item-icon { margin-left: -36px; }

    /* Images */
    .form-image-preview img { max-width: 100%; height: auto; }

    /* Back button */
    .back-btn-mobile { padding: 8px 15px; }

    /* Forms */
    .form-control { max-width: 100%; box-sizing: border-box; }
    .p-controller { width: 100% !important; }
    .w-50 { width: 100% !important; }
}

/* ===== #1 — FADE-IN ПУБЛИКАЦИЙ (ВОЛНА) ===== */
@keyframes pubFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.timeline-item.anim-in {
    animation: pubFadeIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

/* ===== #5 — SKELETON LOADER ===== */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}
.skeleton-line {
    height: 12px; border-radius: 3px; margin-bottom: 10px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.10) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite;
}
[data-theme="light"] .skeleton-line {
    background: linear-gradient(90deg,
        rgba(0,0,0,0.04) 25%,
        rgba(0,0,0,0.08) 50%,
        rgba(0,0,0,0.04) 75%);
    background-size: 800px 100%;
}
.skeleton-block { padding: 16px 0; border-bottom: 1px solid var(--border, rgba(255,255,255,0.04)); }

/* ===== #3 — CUSTOM SCROLLBAR ===== */
/* Firefox */
.chats-list, .js-chat-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(82,134,255,0.35) transparent;
}
/* WebKit */
.chats-list::-webkit-scrollbar,
.js-chat-container::-webkit-scrollbar { width: 4px; }
.chats-list::-webkit-scrollbar-track,
.js-chat-container::-webkit-scrollbar-track { background: transparent; }
.chats-list::-webkit-scrollbar-thumb,
.js-chat-container::-webkit-scrollbar-thumb {
    background: rgba(82,134,255,0.35);
    border-radius: 2px;
}
.chats-list::-webkit-scrollbar-thumb:hover,
.js-chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(82,134,255,0.65);
}

/* ===== #7 — FANCYBOX BLUR BACKDROP ===== */
.fancybox__backdrop {
    backdrop-filter: blur(12px) brightness(0.6);
    -webkit-backdrop-filter: blur(12px) brightness(0.6);
    background: rgba(6, 8, 16, 0.75) !important;
}
