@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
}

@media (max-width: 480px) {
    .profile-tab {
        min-width: 100px;
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .profile-header {
        padding: 24px 16px;
    }
    
    .profile-section {
        padding: 0 16px;
    }
    
}

.chat-menu {
    position: fixed;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
    animation: fadeInUp 0.2s ease;
}

.chat-menu-content {
    padding: 8px 0;
}

.chat-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chat-menu-item:hover {
    background: var(--bg-hover);
}

.chat-menu-item i {
    width: 20px;
    color: var(--text-muted);
}

.chat-menu-item.delete {
    color: var(--danger-color);
}

.chat-menu-item.delete:hover {
    background: rgba(255, 59, 48, 0.1);
}

#back-to-list-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-right: 8px;
}

#back-to-list-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .chat-container {
        height: calc(100vh - 120px);
    }

    .chat-header {
        padding: 12px 16px;
    }

    .chat-input-container {
        padding: 0px 0px;
    }
    
    .input-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .send-button {
        width: 40px;
        height: 40px;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .message-time {
        font-size: 11px;
    }

    .chat-messages {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .member-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px;
    }
    
    .member-avatar {
        width: 48px;
        height: 48px;
    }
    
    .member-info {
        text-align: center;
    }
}

.chat-area-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

@media (max-width: 360px) {
    .chat-list-header h3 {
        font-size: 18px;
    }

    .search-input {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .chat-menu {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }
    
}

.message-input {
    min-height: 40px;
    max-height: 120px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .typing-indicator {
        padding: 8px 16px;
    }
    
    .typing-avatar {
        width: 28px;
        height: 28px;
    }
    
    .typing-text {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .chat-item {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    .message {
        -webkit-tap-highlight-color: transparent;
    }
    
    button {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .chat-menu-modal {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        margin: 0;
        max-height: 80vh;
        overflow-y: auto;
        animation: modalSlideUp 0.3s ease;
    }
    
    @keyframes modalSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-fast);
}

.member-item:hover {
    background: var(--bg-hover);
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 500;
    color: var(--text-primary);
}

.member-status {
    font-size: 12px;
    color: var(--text-muted);
}

.member-status.online {
    color: var(--success-color);
}

.member-role {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}























@media (max-width: 1100px) {
    

    
}

@media (max-width: 640px) {
    
}













.fullscreen-modal {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.fullscreen-modal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

.fullscreen-modal .modal-header {
    background: transparent;
    border: none;
}

.fullscreen-modal .close {
    background: rgba(0, 0, 0, 0.5);
    color: white;
}

.fullscreen-modal .close:hover {
    background: rgba(255, 255, 255, 0.2);
}











@media (max-width: 480px) {
    
    
    
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-body .form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
}

.modal-body .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.2);
}

.modal-body .form-control::placeholder {
    color: var(--text-muted);
}

.modal-body textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.chat-type-selector {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.chat-type-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.chat-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chat-type-option .option-content {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-fast);
}

.chat-type-option input[type="radio"]:checked + .option-content {
    background: rgba(42, 171, 238, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(42, 171, 238, 0.1);
}

.chat-type-option:hover .option-content {
    background: var(--bg-hover);
}

.chat-type-option i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.chat-type-option span {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.chat-type-option small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

#chat-members {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    overflow-y: auto;
}

#chat-members option {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

#chat-members option:checked {
    background: var(--primary-color);
    color: white;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}
/* Добавьте в style1.css или style2.css */

/* Карточка задачи в чате */




































/* Модальное окно задачи из чата */
































.participant-info {
    flex: 1;
}

.participant-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.participant-role {
    font-size: 12px;
    color: var(--text-muted);
}















/* Адаптация для мобильных */
@media (max-width: 768px) {
    
    
    
    
    
    
    
    
    
}
/* Вкладки в модальном окне задачи */


















/* Комментарии */


















/* История */


.history-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.history-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    color: var(--primary-color);
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-action {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.history-item-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.history-item-change {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 4px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    
    
    
    
    .attachments-grid {
        grid-template-columns: 1fr;
    }
    
    
}

/* Галерея изображений */
.message-gallery {
    margin: 5px 0;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-color: rgb(0 0 0 / 5%);
}

.gallery-track {
    display: flex;
    transition: transform 0.3s ease;
}

.gallery-slide {
    flex-shrink: 0;
    width: 100%;
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    background: #2a2a2a;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.gallery-image-overlay {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    border-radius: 0 12px 0 12px;
}

.gallery-image-wrapper:hover .gallery-image-overlay {
    opacity: 1;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 8px;
}

.gallery-nav.next {
    right: 8px;
}

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-dot.active {
    background: white;
    transform: scale(1.2);
}

.gallery-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
    color: white;
    z-index: 10;
}

/* Список файлов */
.message-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-files-list .message-file {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 8px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .message-gallery {
        max-width: 300px;
    }
    
    .gallery-nav {
        width: 28px;
        height: 28px;
    }
}
/* Меню упоминаний */
.mentions-menu {
    position: fixed;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    width: 280px;
    max-height: 300px;
    overflow: hidden;
    z-index: 10050;
    animation: mentionsFadeIn 0.15s ease;
}

@keyframes mentionsFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mentions-menu-header {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mentions-menu-header i {
    font-size: 12px;
}

.mentions-menu-list {
    max-height: 250px;
    overflow-y: auto;
}

.mentions-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mentions-menu-item:hover,
.mentions-menu-item.selected {
    background: var(--bg-hover);
}

.mentions-menu-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mentions-item-info {
    flex: 1;
}

.mentions-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.mentions-item-username {
    font-size: 11px;
    color: var(--text-muted);
}

.mentions-item-online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34C759;
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

/* Подсветка упоминаний в сообщениях */
.message-mention {
    background: rgba(35, 149, 8, 0.25);
    border-radius: 4px;
    padding: 2px 4px;
    font-weight: 500;
    color: var(--primary-color);
    display: inline-block;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.message-mention:hover,
.message-mention:focus-visible {
    filter: brightness(1.08);
    outline: 2px solid color-mix(in srgb, currentColor 34%, transparent);
    outline-offset: 1px;
}

.message-mention.self-mention {
    background: rgba(255, 149, 0, 0.3);
    color: var(--warning-color);
    font-weight: 600;
}

.message.own .message-mention {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.message.own .message-mention.self-mention {
    background: rgba(255, 149, 0, 0.4);
    color: #fff;
}

/* Анимация при упоминании */
.message.highlight-mention {
    animation: mentionHighlight 1.5s ease;
}

@keyframes mentionHighlight {
    0% {
        background-color: rgba(35, 149, 8, 0.3);
        transform: scale(1.01);
    }
    50% {
        background-color: rgba(35, 149, 8, 0.1);
        transform: scale(1);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}
.poll-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    text-align: right;
}

.close-poll-btn {
    background: var(--warning-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-poll-btn:hover {
    background: #e08e00;
    transform: translateY(-1px);
}

    .highlight-reply {
        animation: replyHighlight 0.5s ease-in-out;
        background: rgba(108, 99, 255, 0.1);
        border-left: 3px solid #6C63FF;
        transition: all 0.3s ease;
    }
    
    .highlight-pinned {
        animation: pinHighlight 0.5s ease-in-out;
        background: rgba(255, 193, 7, 0.1);
        border-left: 3px solid #ffc107;
    }
    
    @keyframes replyHighlight {
        0%, 100% { 
            background: rgba(108, 99, 255, 0); 
            border-left-color: transparent;
        }
        50% { 
            background: rgba(108, 99, 255, 0.2); 
            border-left-color: #6C63FF;
        }
    }
    
    @keyframes pinHighlight {
        0%, 100% { 
            background: rgba(255, 193, 7, 0); 
            border-left-color: transparent;
        }
        50% { 
            background: rgba(255, 193, 7, 0.2); 
            border-left-color: #ffc107;
        }
    }
    
    .download-progress-message {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .download-progress-message:last-child {
        border-bottom: none;
    }
    
    .progress-spinner {
        margin-left: auto;
    }
