/* ====================== */
/*     Global Styles      */
/* ====================== */
.active .icon {
    color: #ffffff !important;
}

/* [DUPLICATE — уже есть в app.min.css (tabler/_badges.scss)]
 * ======================
 *   Notification badge
 * ======================
 * .nav-unread {
 *     position: relative;
 *     width: 10px;
 *     height: 10px;
 *     border-radius: 50%;
 *     background: #ff4d4f;
 *     display: inline-block;
 *     margin-left: 4px;
 *     font-size: 0;
 *     line-height: 0;
 *     box-shadow: 0 0 0 rgba(255, 77, 79, 0.5);
 *     transition: opacity 0.2s ease;
 * }
 * .nav-unread.hidden,
 * .nav-unread[hidden],
 * [data-nav-indicator-mode="dot"][hidden] {
 *     display: none !important;
 * }
 * [data-nav-indicator-mode="dot"] {
 *     width: 10px;
 *     height: 10px;
 *     border-radius: 50%;
 *     background: #ff4d4f;
 *     font-size: 0;
 *     line-height: 0;
 *     box-shadow: 0 0 0 rgba(255, 77, 79, 0.4);
 * }
 * [data-nav-indicator-mode="dot"].nav-badge-empty {
 *     opacity: 0;
 * }
 * [data-nav-indicator-mode="dot"].nav-indicator-pulse {
 *     animation: nav-dot-pulse 1.8s ease-out;
 * }*/
  @keyframes nav-dot-pulse {
      0%  { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.8); }
      70% { box-shadow: 0 0 0 8px rgba(255, 77, 79, 0); }
      100%{ box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
  }


/* ====================== */
/*   Bottom Sheet Modal   */
/* ====================== */
@media (min-width: 768px) {
    @supports not (scrollbar-gutter: stable) {
        html {
            overflow-y: scroll;
        }
    }

    body.modal-open {
        padding-right: 0 !important;
    }
}

.modal.modal-bottom-sheet.fade .modal-dialog {
    margin: 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    transform: translateY(100%) !important;
    opacity: 0 !important;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.35s ease !important;
    will-change: transform;
    padding: 0 0 env(safe-area-inset-bottom, 0);
}

.modal.modal-bottom-sheet.fade.show .modal-dialog {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.modal-bottom-sheet .modal-dialog.is-dragging {
    transition: none;
}

body.dark .custom-switch-input:checked ~ .custom-switch-description,
.theme-dark .custom-switch-input:checked ~ .custom-switch-description {
    color: #e5e7eb !important;
}

.modal-bottom-sheet .modal-content {
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.35);
    border: none;
    max-height: calc(100vh - 0.5rem);
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-bottom-sheet .bottom-sheet-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 2;
}

.modal-bottom-sheet form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.modal-bottom-sheet .bottom-sheet-handle {
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: rgba(142, 150, 170, 0.8);
    margin: 0.75rem auto 0.5rem;
}

.modal-bottom-sheet .modal-body {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
}

@media (min-width: 768px) {
    .modal.modal-bottom-sheet.fade .modal-dialog {
        left: 0;
        right: 0;
        bottom: 0;
        width: 576px !important;
        min-width: 456px;
        max-width: min(576px, calc(100% - 2rem)) !important;
        margin: 0 auto;
    }

    .modal-bottom-sheet .modal-content {
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.25);
    }

    .mutual-modal.modal.fade .modal-dialog {
        transition: transform 0.3s ease-out !important;
    }
}

@media (max-width: 767.98px) {
    .mutual-modal.modal-bottom-sheet {
        z-index: 1060 !important;
    }

    .mutual-modal.modal-bottom-sheet .modal-dialog {
        bottom: 0 !important;
        z-index: 1060 !important;
    }
}

.mutual-modal .modal-content.mutual-match {
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 34%),
        linear-gradient(180deg, #6f22ff 0%, #5714bf 58%, #4b0fa5 100%);
    color: #fff;
}

.mutual-modal .modal-content.mutual-match .mutual-handle {
    display: none;
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    margin: 12px auto 2px;
}

@media (max-width: 767.98px) {
    .mutual-modal .modal-content.mutual-match .mutual-handle {
        display: block;
    }
}

.mutual-modal .modal-content.mutual-match .modal-body {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.mutual-modal .modal-content.mutual-match .mutual-shell {
    position: relative;
    color: #fff;
}

.mutual-modal .modal-content.mutual-match .mutual-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/heart-shape2.png") no-repeat center 132px;
    background-size: 190px auto;
    opacity: 0.72;
    pointer-events: none;
}

.mutual-modal .modal-content.mutual-match .mutual-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    z-index: 3;
}

.mutual-modal .modal-content.mutual-match .mutual-card {
    position: relative;
    z-index: 1;
    padding: 16px 22px 18px;
    text-align: center;
}

.mutual-modal .modal-content.mutual-match .mutual-badge {
    margin-top: 14px;
    margin-bottom: 14px;
    font-size: 46px;
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -1.6px;
    text-transform: lowercase;
}

.mutual-modal .modal-content.mutual-match .mutual-subtitle {
    margin: 0 0 30px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

.mutual-modal .modal-content.mutual-match .mutual-avatars {
    gap: 10px;
    margin-bottom: 30px;
    min-height: 164px;
}

.mutual-modal .modal-content.mutual-match .mutual-avatar {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 5px solid rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.mutual-modal .modal-content.mutual-match .mutual-heart {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(255, 59, 92, 0.14);
    box-shadow: 0 0 0 rgba(255, 59, 92, 0.28);
    animation: mutual-heart-pulse 2s infinite;
}

.mutual-modal .modal-content.mutual-match .mutual-heart i {
    font-size: 24pt;
    color: #ff304f;
}

@keyframes mutual-heart-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.22);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(255, 59, 92, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 92, 0);
    }
}

.mutual-modal .modal-content.mutual-match .modal-body-inner {
    position: relative;
    z-index: 1;
}

.mutual-modal .modal-content.mutual-match .conversation-input {
    width: 100%;
    margin: 0 auto 16px;
}

.mutual-modal .modal-content.mutual-match .input-group {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    overflow: hidden;
}

.mutual-modal .modal-content.mutual-match .message-input.form-control {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    border: 0;
    border-radius: 0;
    padding: 12px 14px;
    background: transparent;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
}

.mutual-modal .modal-content.mutual-match .message-input.form-control::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.mutual-modal .modal-content.mutual-match .message-input.form-control:focus {
    background: transparent;
    color: #fff;
    box-shadow: none;
}

.mutual-modal .modal-content.mutual-match .input-group-append {
    display: flex;
    flex: 0 0 auto;
}

.mutual-modal .modal-content.mutual-match .mutual-send-btn {
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: #4b8df8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    flex: 0 0 44px;
    margin: 0;
    line-height: 1;
    font-size: 16px;
    background-image: none;
}

.mutual-modal .modal-content.mutual-match .mutual-send-btn .fe {
    font-size: 16px;
    line-height: 1;
}

.mutual-modal .modal-content.mutual-match .mutual-send-btn:hover,
.mutual-modal .modal-content.mutual-match .mutual-send-btn:focus,
.mutual-modal .modal-content.mutual-match .mutual-send-btn:active {
    background: #4b8df8;
    color: #fff;
    border: 0;
    box-shadow: none;
    outline: none;
}

.mutual-modal .modal-content.mutual-match .mutual-send-btn:disabled {
    opacity: 0.72;
}

.mutual-modal .modal-content.mutual-match .mutual-emojis {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 26px;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mutual-modal .modal-content.mutual-match .mutual-emojis::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.mutual-modal .modal-content.mutual-match .emoji-btn {
    min-width: 54px;
    flex: 0 0 auto;
    height: 44px;
    border: 0;
    border-radius: 14px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.mutual-modal .modal-content.mutual-match .mutual-actions {
    position: relative;
    z-index: 1;
}

.mutual-modal .modal-content.mutual-match .mutual-keep {
    height: 54px;
    border: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

@media (max-width: 767.98px) {
    .mutual-modal .modal-content.mutual-match .mutual-handle {
        display: block;
    }

    .mutual-modal .modal-content.mutual-match .mutual-card {
        padding: 10px 16px 16px;
    }

    .mutual-modal .modal-content.mutual-match .mutual-avatar {
        width: 96px;
        height: 96px;
    }

    .mutual-modal .modal-content.mutual-match .mutual-badge {
        font-size: 38px;
    }
}

.directory-search-form h1 {
    font-size: 1rem;
}

.spotlight-items-horizontal .spotlight-item:hover {
    transform: scale(1.05);
    transition: all 0.4s ease;
}

.directory-list-view .directory-item .card:hover {
    transform: scale(1.02);
    transition: all 0.4s ease;
}

/* ====================== */
/*   Directory List View  */
/* ====================== */
.directory-list-view .directory-item .user-premium-badge,
.directory-list-view .directory-item .user-verified-badge {
    background: transparent !important;
}

.directory-list-view .directory-item .user-premium-badge i.fa,
.directory-list-view .directory-item .user-premium-badge i.fas {
    color: #fd9644 !important;
}

.directory-list-view .directory-item .user-verified-badge i.fe {
    color: #9ab0ff !important;
}

.directory-list-view .directory-item .user-photos-count {
    bottom: 0.75rem !important;
    right: 0.75rem !important;
}

/* ====================== */
/*   Profile Main Info    */
/* ====================== */
.profile-main-info .first-line .user-premium-badge,
.profile-main-info .first-line .user-verified-badge,
.profile-main-info .second-line .user-premium-badge,
.profile-main-info .second-line .user-verified-badge {
    background: transparent !important;
}

.profile-main-info .first-line .user-premium-badge i.fa,
.profile-main-info .second-line .user-premium-badge i.fa,
.profile-main-info .first-line .user-premium-badge i.fas,
.profile-main-info .second-line .user-premium-badge i.fas {
    color: #fd9644 !important;
}

.profile-main-info .first-line .user-verified-badge i.fe,
.profile-main-info .second-line .user-verified-badge i.fe {
    color: #9ab0ff !important;
}

/* ====================== */
/*      Spotlight         */
/* ====================== */
.spotlight-items-horizontal .spotlight-item.spotlight-item-submit .avatar:before {
    background-color: rgb(235 235 235 / 55%) !important;
}

.spotlight-items-horizontal .spotlight-item.spotlight-item-submit .avatar .icon {
    margin-bottom: 0 !important;
    color: #ffffff !important;
}

/* Позиционирование индикатора в Spotlight на краю скругленного фото */
.spotlight-items-horizontal .spotlight-item .avatar {
    position: relative;
}

/* Мобильная версия - по умолчанию */
.spotlight-items-horizontal .spotlight-item .avatar .avatar-status {
    position: absolute;
    right: 0.1rem;
    bottom: 0.1rem;
    width: 0.75rem;
    height: 0.75rem;
}

/* Десктопная версия */
@media (min-width: 768px) {
    .spotlight-items-horizontal .spotlight-item .avatar .avatar-status {
        position: absolute;
        right: 0.25rem;
        bottom: 0.25rem;
        width: 1rem;
        height: 1rem;
    }
}

/* Анимация пульсации для онлайн-индикатора в Spotlight */
@keyframes spotlight-online-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(47, 179, 68, 0.75);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(47, 179, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(47, 179, 68, 0);
    }
}

/* ====================== */
/*      Messages          */
/* ====================== */
.messages-conversation {
    position: relative;
    min-height: 500px;
}

.messages-conversation .conversation-header {
    height: 57px !important;
}

.messages-conversation .conversation-header .avatar {
    width: 2rem !important;
    height: 2rem !important;
}

@media (max-width: 767.98px) {
    .conversation-header-sticky {
        position: sticky;
        top: 0;
        z-index: 5;
        background: var(--card-bg, #fff);
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
    }

    .messages-mobile-chat-active .conversation-header-sticky {
        position: sticky;
        top: max(var(--safe-area-inset-top, 0), env(safe-area-inset-top, 0));
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .messages-mobile-chat-active .messages-conversation {
        padding-top: calc(73px + max(var(--safe-area-inset-top, 0), env(safe-area-inset-top, 0)));
    }
}

.messages-conversation .conversation-items .date span {
    text-transform: none !important;
}

.conversation-items {
    transition: opacity 0.3s ease;
}

.btn-back-feedback {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-back-feedback::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.btn-back-feedback.is-pressed {
    transform: scale(0.96);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.btn-back-feedback.is-pressed::after {
    opacity: 1;
}

@keyframes message-pop-in {
    0% {
        opacity: 0;
        margin-top: -12px;
        transform: translateY(24px) scale(0.95);
    }
    40% {
        opacity: 0.25;
        margin-top: 0;
        transform: translateY(10px) scale(0.99);
    }
    70% {
        opacity: 0.9;
        transform: translateY(0) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: none;
    }
}

.conversation-items .item {
    transform-origin: bottom center;
}

.conversation-items .item.ng-enter {
    animation: message-pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.conversation-items .item.ng-enter-stagger {
    animation-delay: 0s !important;
    transition-delay: 0s !important;
}

/* Vue 3 Transition animations for messages */
.message-enter-active {
    animation: message-pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0s !important;
    transition-delay: 0s !important;
}

.message-move {
    transition: transform 0.3s ease;
}

.message-leave-active {
    position: absolute;
    opacity: 0;
    transform: translateX(20px);
}

/* ====================== */
/*   Lazy Loading Images   */
/* ====================== */
.lazy-loading {
    opacity: 0.6;
    filter: blur(2px);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.lazy-loaded {
    opacity: 1;
    filter: blur(0);
}

.lazy-error {
    opacity: 0.4;
    filter: grayscale(100%);
}

/* Fallback for images that fail to load */
.lazy-error::before {
    content: "⚠️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #6c757d;
}

/* Avatar lazy loading */
.avatar.lazy-loading {
    background-color: #f8f9fa;
    background-image: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Message images lazy loading */
.conversation-items .item .images img.lazy-loading {
    min-height: 100px;
    background-color: #f8f9fa;
}

.conversation-items .item .images img.lazy-loaded {
    min-height: auto;
}

/* ====================== */
/*    File Previews        */
/* ====================== */
.typing-indicator {
    padding: 10px 15px;
    margin: 5px 0;
    background-color: #f0f0f0;
    border-radius: 18px;
    display: inline-block;
    font-size: 14px;
    color: #555;
}

.typing-header-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-header-indicator-text {
    display: inline-block;
}

.typing-header-dots {
    display: inline-flex;
    gap: 2px;
}

.typing-header-dots span {
    width: 4px;
    height: 4px;
    background-color: currentColor;
    border-radius: 50%;
    display: inline-block;
    animation: typing-dots 1.4s infinite both;
}

.typing-header-dots span:nth-child(1) { animation-delay: 0s; }
.typing-header-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-header-dots span:nth-child(3) { animation-delay: 0.4s; }

.text-muted .typing-header-indicator {
    color: #9aa0ac;
}

.message-deleted {
    opacity: 0.7;
    font-style: italic;
}

.messages-conversations .message {
    display: block;
    min-height: 1.2rem;
}

/* ====================== */
/*    Connection Status   */
/* ====================== */
.connection-indicator {
    font-size: 0.8em;
}

.connection-indicator .fe-wifi {
    animation: pulse 2s infinite;
}

/* ====================== */
/*    Mobile Overrides    */
/* ====================== */
@media (max-width: 767.98px) {
    .spotlight-items-horizontal {
        overflow-x: auto !important;
        padding-bottom: 0.5rem;
    }

    .body-messages .page-fill .content .card {
        height: calc(100% - 45px);
    }

    .body-messages.messages-mobile-chat-active .page-fill .content .card {
        height: 100%;
    }

    ul.messenger.messenger-fixed.messenger-on-bottom,
    ul.messenger.messenger-fixed.messenger-on-top {
        left: 10% !important;
        width: 80% !important;
        margin-top: 120px !important;
        margin-left: auto !important;
        bottom: auto !important;
    }
}

/* ====================== */
/*      Animations        */
/* ====================== */
/* Pulse animations */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

@keyframes pulse-glow-primary {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

@keyframes pulse-glow-danger {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Typing animations */
@keyframes typing-dots {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

@keyframes typing-dots-header {
    0%, 60%, 100% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-1px) scale(1.2); }
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Connection animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Fade animations */
.fade-enter, .fade-leave-to {
    opacity: 0;
}

.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.message-input:focus + .input-group-append + .input-group-append + .text-right {
    animation: fadeIn 0.3s ease-in;
}

/* ====================== */
/*   Multi-line Textarea  */
/* ====================== */

/* Essential styles for textarea functionality */
.conversation-input .message-input {
    /* Core functionality */
    resize: none;
    min-height: 38px;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;

    /* Auto-resize support */
    field-sizing: content;
    transition: height 0.2s ease;
}

/* ====================== */
/*   Vue Message Status   */
/* ====================== */

/* Статусы сообщений для полной совместимости с AngularJS */
.messages-vue-root .item[data-status="pending"] .spinner {
    display: inline-block !important;
    opacity: 1 !important;
}

.messages-vue-root .item[data-status="delivered"] .spinner {
    display: none !important;
}

.messages-vue-root .item[data-status="failed"] .text {
    opacity: 0.7 !important;
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Темная тема для статусов */
@media (prefers-color-scheme: dark) {
    .messages-vue-root .item[data-status="failed"] .text {
        background-color: #4a1f1f !important;
        color: #e6b8b8 !important;
    }
}

body.dark .messages-vue-root .item[data-status="failed"] .text {
    background-color: #4a1f1f !important;
    color: #e6b8b8 !important;
}

/* Оптимистичные сообщения (temp ID) */
.messages-vue-root .item[id^="temp-"] {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.messages-vue-root .item[id^="temp-"].delivered {
    opacity: 1;
}

/* ====================== */
/*   Navigation Badges    */
/* ====================== */

/* Плавное появление/скрытие badge */
.nav-badge {
    --nav-indicator-shadow-color: rgba(0, 0, 0, 0.28);
    --nav-indicator-translate-x: 0;
    --nav-indicator-translate-y: 0;
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    transform: translate(var(--nav-indicator-translate-x), var(--nav-indicator-translate-y)) scale(1);
}

/* Мобильные индикаторы в меню должны быть выше самого меню */
@media (max-width: 767.98px) {
    .header-mobile-nav .nav-item {
        position: relative !important;
    }

    .header-mobile-nav .nav-badge,
    .header-mobile-nav .badge,
    .header-mobile-nav .notification-indicator,
    .header-mobile-nav .unread-counter,
    .header-mobile-nav .nav-unread {
        position: absolute !important;
        z-index: 1060 !important;
        top: -0.2rem !important;
        right: -0.35rem !important;
        min-width: 16px !important;
        height: 16px !important;
        border-radius: 8px !important;
        font-size: 10px !important;
        line-height: 16px !important;
        text-align: center !important;
        padding: 0 4px !important;
        background: #ff314e !important;
    }

    .header-mobile-nav .nav-unread {
        min-width: 8px !important;
        min-height: 8px !important;
        width: 8px !important;
        height: 8px !important;
        border-radius: 50% !important;
        top: -0.2rem !important;
        right: -0.35rem !important;
        padding: 0 !important;
        background: #ff314e !important;
        display: block !important;
    }
}

.nav-badge[hidden] {
    display: none !important;
}

.nav-badge-empty {
    opacity: 0;
    transform: translate(var(--nav-indicator-translate-x), var(--nav-indicator-translate-y)) scale(0.8);
}

.nav-badge:not(.nav-badge-empty) {
    opacity: 1;
    transform: translate(var(--nav-indicator-translate-x), var(--nav-indicator-translate-y)) scale(1);
}

.nav-indicator-pulse {
    animation: nav-indicator-pulse 0.55s ease-out;
}

@keyframes nav-indicator-pulse {
    0% {
        transform: translate(var(--nav-indicator-translate-x), var(--nav-indicator-translate-y)) scale(0.85);
        box-shadow: 0 0 0 0 var(--nav-indicator-shadow-color, rgba(0, 0, 0, 0.28));
    }
    60% {
        box-shadow: 0 0 0 6px rgba(0, 0, 0, 0);
    }
    100% {
        transform: translate(var(--nav-indicator-translate-x), var(--nav-indicator-translate-y)) scale(1);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

.sidebar-unread-badge {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.sidebar-unread-badge.sidebar-unread-badge-pulse {
    animation: sidebar-unread-badge-pulse 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes sidebar-unread-badge-pulse {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.45);
    }
    60% {
        transform: scale(1.08);
        box-shadow: 0 0 0 8px rgba(255, 82, 82, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
    }
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.spotlight-items-horizontal {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.spotlight-horizontal-wrapper {
    position: relative;
}

.spotlight-scroll-arrow {
    position: absolute;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
    opacity: 0.8;
}

.spotlight-scroll-arrow[hidden] {
    display: none !important;
}

.spotlight-scroll-arrow:hover {
    background: rgba(0, 0, 0, 0.35);
    opacity: 1;
}

.spotlight-scroll-left {
    left: 6px;
}

.spotlight-scroll-right {
    right: 6px;
}

@media (min-width: 768px) {
    .spotlight-scroll-arrow {
        display: inline-flex;
    }
}

.spotlight-item-appear .avatar {
    animation: spotlight-avatar-pulse 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotlight-item-pre-enter {
    opacity: 1;
    transform: none;
}

.spotlight-item-pre-enter .avatar {
    background: none !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
    box-shadow: inset 0 0 0 2px rgba(69, 170, 242, 0.18);
}

.spotlight-item-pre-enter .name {
    opacity: 0;
}

.spotlight-item-enter {
    animation: spotlight-item-enter 0.35s cubic-bezier(0.2, 0, 0, 1);
}

.spotlight-item-enter .avatar {
    animation: spotlight-avatar-enter-pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spotlight-item-enter {
    0% {
        transform: translateX(-14px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spotlight-avatar-enter-pulse {
    0% {
        transform: scale(0.92);
        box-shadow: 0 0 0 2px rgba(69, 170, 242, 0.40);
    }
    60% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(69, 170, 242, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(69, 170, 242, 0);
    }
}

@keyframes spotlight-avatar-pulse {
    0% {
        transform: scale(0.92);
        box-shadow: 0 0 0 0 rgba(69, 170, 242, 0.45);
    }
    60% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(69, 170, 242, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(69, 170, 242, 0);
    }
}

/* ====================== */
/*  Password Toggle Eye   */
/* ====================== */
.password-wrapper {
    position: relative;
}

.password-wrapper input.form-control {
    padding-right: 2.5rem;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #868e96;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    outline: none;
}

.password-wrapper .toggle-password:hover {
    color: #495057;
}

.password-wrapper .toggle-password:focus {
    outline: none;
    box-shadow: none;
}

body.dark .password-wrapper .toggle-password,
.theme-dark .password-wrapper .toggle-password {
    color: #9aa0ac;
}

body.dark .password-wrapper .toggle-password:hover,
.theme-dark .password-wrapper .toggle-password:hover {
    color: #e5e7eb;
}

/* ====================== */
/*   OAuth Social Buttons */
/* ====================== */
.btn-yandex {
    color: #fff !important;
    background-color: #FC3F1D !important;
    border-color: #FC3F1D !important;
}
.btn-yandex:hover,
.btn-yandex:focus {
    color: #fff !important;
    background-color: #e0361a !important;
    border-color: #d43217 !important;
}

.btn-tiktok {
    color: #fff !important;
    background-color: #000000 !important;
    border-color: #000000 !important;
}
.btn-tiktok:hover,
.btn-tiktok:focus {
    color: #fff;
    background-color: #25f4ee !important;
    border-color: #25f4ee !important;
}

/* ======================
      Icon Sizes
   ====================== */
.fs-icon-sm { font-size: 0.875em !important; }
.fs-icon-md { font-size: 1em !important; }
.fs-icon-lg { font-size: 1.25em !important; }

/* ======================
     Icon Animations
   ====================== */
.pulse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffc107, #ff9800);
    color: #ffffff !important;
    position: relative;
    animation: pulse-glow 2s infinite;
    box-shadow: 0 0 0 rgba(255, 193, 7, 0.7);
    transition: all 0.3s ease;
    z-index: 2;
}

.pulse-icon i {
    font-size: 1.2rem;
    color: inherit !important;
    position: relative;
    z-index: 2;
}

.pulse-icon-lg {
    width: 60px;
    height: 60px;
}
.pulse-icon-lg i {
    font-size: 1.8rem;
}

.pulse-icon-sm {
    width: 30px;
    height: 30px;
}
.pulse-icon-sm i {
    font-size: 0.9rem;
}

.pulse-icon-primary {
    background: linear-gradient(45deg, #45aaf2, #219af0);
    animation: pulse-glow-primary 2s infinite;
}

.pulse-icon-danger {
    background: linear-gradient(45deg, #dc3545, #bb2d3b);
    animation: pulse-glow-danger 2s infinite;
}

/* ======================
     Animation Keyframes
   ====================== */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

@keyframes pulse-glow-primary {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

@keyframes pulse-glow-danger {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* ======================
     Dark Mode Overrides
   ====================== */
body.dark .typing-indicator {
    background-color: #2a2a2a;
    color: #ccc;
}

body.dark .avatar.lazy-loading {
    background-color: #1a1a1a;
    background-image: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
}

body.dark .conversation-items .item .images img.lazy-loading {
    background-color: #1a1a1a;
}

body.dark .spotlight-item-pre-enter .avatar {
    background-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 0 0 0 2px rgba(69, 170, 242, 0.35);
}

body.dark .modal-bottom-sheet .modal-content {
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.55);
}

body.dark .lazy-error::before {
    color: #9aa0ac;
}

body.dark .conversation-header-sticky {
    background: var(--card-bg, #1a1a1a);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

