
.warning-modal .modal-header {
    background: rgba(255, 149, 0, 0.1);
    border-bottom-color: var(--warning-color);
}

.warning-modal .modal-header h3 {
    color: var(--warning-color);
}

.warning-modal .modal-body {
    text-align: center;
}

.warning-icon {
    font-size: 48px;
    color: var(--warning-color);
    margin-bottom: 20px;
}

.error-modal .modal-header {
    background: rgba(255, 59, 48, 0.1);
    border-bottom-color: var(--danger-color);
}

.error-modal .modal-header h3 {
    color: var(--danger-color);
}

.error-modal .modal-body {
    text-align: center;
}

.error-icon {
    font-size: 48px;
    color: var(--danger-color);
    margin-bottom: 20px;
}

.success-modal .modal-header {
    background: rgba(52, 199, 89, 0.1);
    border-bottom-color: var(--success-color);
}

.success-modal .modal-header h3 {
    color: var(--success-color);
}

.success-modal .modal-body {
    text-align: center;
}

.success-icon {
    font-size: 48px;
    color: var(--success-color);
    margin-bottom: 20px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(85vh - 120px);
    }
    
    .modal-footer {
        padding: 16px 20px;
    }
    
    .chat-type-selector {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-cancel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-body {
        padding: 16px;
        max-height: calc(100vh - 120px);
    }
    
    .modal-footer {
        padding: 12px 16px;
    }
}

.modal-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.modal-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.modal-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-tab.active {
    background: var(--primary-color);
    color: white;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.file-input-container {
    position: relative;
    margin-bottom: 20px;
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.file-input-label:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.file-input-label i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.file-input-label span {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.file-input-label small {
    color: var(--text-muted);
    font-size: 13px;
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.selected-files-list {
    margin-top: 20px;
}

.selected-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 8px;
}

.selected-file i {
    color: var(--primary-color);
    font-size: 20px;
}

.selected-file-info {
    flex: 1;
}

.selected-file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.selected-file-size {
    font-size: 12px;
    color: var(--text-muted);
}

.remove-file-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-circle);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.remove-file-btn:hover {
    background: var(--danger-color);
    color: white;
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.modal-loading i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.modal-loading span {
    color: var(--text-primary);
    font-weight: 500;
}

.confirmation-modal .modal-body {
    text-align: center;
}

.confirmation-icon {
    font-size: 64px;
    color: var(--warning-color);
    margin-bottom: 20px;
}

.confirmation-message {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.confirmation-details {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.field-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.field-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.field-group h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 44px;
}

.input-with-icon.right-icon i {
    left: auto;
    right: 16px;
}

.input-with-icon.right-icon .form-control {
    padding-left: 16px;
    padding-right: 44px;
}

.expanding-textarea {
    position: relative;
}

.expanding-textarea .form-control {
    min-height: 40px;
    max-height: 200px;
    resize: none;
    overflow-y: auto;
}

.expanding-textarea .char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.expanding-textarea .char-count.near-limit {
    color: var(--warning-color);
}

.expanding-textarea .char-count.over-limit {
    color: var(--danger-color);
}
.notifications-list {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.notification-item {
    position: relative;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(42, 171, 238, 0.08) 0%, rgba(42, 171, 238, 0.02) 100%);
    border-left: 3px solid var(--primary-color);
    padding-left: 17px;
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, rgba(42, 171, 238, 0.12) 0%, rgba(42, 171, 238, 0.04) 100%);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: var(--radius-circle);
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.2);
    }
}

.notification-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.notification-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-circle);
    font-size: 10px;
    margin-top: 2px;
}

.notification-icon.message { background: rgba(42, 171, 238, 0.2); color: var(--primary-color); }
.notification-icon.friend { background: rgba(52, 199, 89, 0.2); color: var(--success-color); }
.notification-icon.task { background: rgba(255, 149, 0, 0.2); color: var(--warning-color); }
.notification-icon.system { background: rgba(142, 142, 147, 0.2); color: var(--text-muted); }
.notification-icon.warning { background: rgba(255, 59, 48, 0.2); color: var(--danger-color); }

.notification-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
    transform: translateX(0);
}

.notification-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-circle);
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.notification-delete-btn:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
    transform: scale(1.1) rotate(90deg);
}

.notification-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.notification-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.notification-time::before {
    content: '🕒';
    font-size: 10px;
    opacity: 0.7;
}

.notification-mark-read-btn {
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-mark-read-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--info-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 171, 238, 0.3);
}

.notification-item.removing {
    animation: notificationSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes notificationSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
        max-height: 150px;
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom-width: 0;
    }
}

.skeleton-notification {
    height: 100px;
    width: 100%;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.skeleton-notification::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.notification-date-group {
    margin-bottom: 16px;
}

.notification-date-header {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    z-index: 5;
}

.notifications-actions-bar {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(20px);
}

.notifications-actions-bar .btn-secondary,
.notifications-actions-bar .btn-danger {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .notification-item {
        padding: 14px 16px;
        gap: 6px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-message {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
    
    .notification-actions {
        opacity: 1;
        transform: none;
    }
    
    .notifications-actions-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .notifications-actions-bar .btn-secondary,
    .notifications-actions-bar .btn-danger {
        width: 100%;
    }
}

@media (prefers-color-scheme: dark) {
    .notification-item.unread {
        background: linear-gradient(90deg, rgba(42, 171, 238, 0.15) 0%, rgba(42, 171, 238, 0.05) 100%);
    }
    
    .notification-item.unread:hover {
        background: linear-gradient(90deg, rgba(42, 171, 238, 0.2) 0%, rgba(42, 171, 238, 0.08) 100%);
    }
    
    .skeleton-notification {
        background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a) 75%;
    }
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notification-item.new-notification {
    animation: notificationSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.task-details-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.task-details-loading {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-details-loading .skeleton {
    height: 20px;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
}

.task-details-loading .skeleton:nth-child(1) { width: 100%; }
.task-details-loading .skeleton:nth-child(2) { width: 90%; }
.task-details-loading .skeleton:nth-child(3) { width: 80%; }
.task-details-loading .skeleton:nth-child(4) { width: 70%; }
.task-details-loading .skeleton:nth-child(5) { width: 60%; }

.task-detail-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.task-detail-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.task-detail-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-detail-section h4 i {
    font-size: 16px;
    color: var(--primary-color);
}

.task-detail-row {
    display: flex;
    margin-bottom: 12px;
    padding: 8px 0;
}

.task-detail-label {
    width: 200px;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.task-detail-value {
    flex: 1;
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
}

.task-detail-value small {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.task-detail-value .task-overdue {
    color: var(--danger-color);
    font-weight: 600;
}

.task-actions-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-top: 32px;
    border: 1px solid var(--border-color);
}

.task-actions-panel button {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.task-actions-panel button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.compact-task-priority, .compact-task-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.compact-task-priority {
    margin: 4px 0;
}

.priority-low {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.priority-medium {
    background: rgba(255, 149, 0, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.priority-high {
    background: rgba(255, 59, 48, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.priority-urgent {
    background: rgba(255, 59, 48, 0.25);
    color: var(--danger-color);
    border: 1px solid rgba(255, 59, 48, 0.4);
    animation: urgentPulse 2s infinite;
}

.status-pending {
    background: rgba(255, 149, 0, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.status-in_progress {
    background: rgba(42, 171, 238, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(42, 171, 238, 0.3);
}

.status-completed {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-cancelled {
    background: rgba(142, 142, 147, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(142, 142, 147, 0.3);
}

.task-history-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.task-history-list::-webkit-scrollbar {
    width: 6px;
}

.task-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.task-history-list::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.task-comments-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.comment-item {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.comment-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.comment-item.regular {
    border-left: 4px solid var(--primary-color);
}

.comment-item.system {
    border-left: 4px solid var(--info-color);
    background: rgba(90, 200, 250, 0.05);
}

.comment-item.warning {
    border-left: 4px solid var(--warning-color);
    background: rgba(255, 149, 0, 0.05);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.comment-info {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
}

.add-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.add-comment-form textarea {
    min-height: 80px;
    max-height: 200px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
}

.add-comment-form button {
    align-self: flex-end;
}

.task-attachments-section {
    margin-top: 32px;
}

.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.attachment-thumbnail {
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.attachment-thumbnail:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.attachment-thumbnail img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.attachment-thumbnail > div:not(img) {
    padding: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--bg-tertiary);
}

.btn-attachments-count {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.btn-attachments-count:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.task-attachments-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.task-attachments-section .btn-secondary {
    margin-left: auto;
    padding: 8px 16px;
    font-size: 14px;
}

#attachments-modal .modal-content {
    max-width: 800px;
    max-height: 80vh;
}

.no-task-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    text-align: center;
    color: var(--text-secondary);
}

.no-task-selected h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.no-task-selected p {
    font-size: 16px;
    max-width: 300px;
    line-height: 1.5;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .task-detail-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .task-detail-label {
        width: 100%;
    }
    
    .task-actions-panel {
        flex-direction: column;
    }
    
    .task-actions-panel button {
        min-width: 100%;
    }
    
    .attachments-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .task-details-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .task-detail-section {
        padding-bottom: 16px;
        margin-bottom: 24px;
    }
    
    .task-detail-section h4 {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .attachments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comments-list {
        max-height: 300px;
    }
    
    .task-history-list {
        max-height: 250px;
    }
}

@keyframes taskDetailsSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-details-content > * {
    animation: taskDetailsSlideIn 0.3s ease forwards;
    opacity: 0;
}

.task-details-content > *:nth-child(1) { animation-delay: 0.1s; }
.task-details-content > *:nth-child(2) { animation-delay: 0.2s; }
.task-details-content > *:nth-child(3) { animation-delay: 0.3s; }
.task-details-content > *:nth-child(4) { animation-delay: 0.4s; }
.task-details-content > *:nth-child(5) { animation-delay: 0.5s; }
.task-details-content > *:nth-child(6) { animation-delay: 0.6s; }

.task-details-panel {
    transition: transform var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-task-item.active {
    background: var(--bg-active);
    position: relative;
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
}

.compact-task-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

.compact-task-item {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.compact-task-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.compact-task-time {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.compact-task-time::before {
    content: '🕒';
    font-size: 10px;
    opacity: 0.7;
}

.compact-task-participants {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.compact-task-participants i {
    font-size: 10px;
    color: var(--text-muted);
}

.compact-task-item .btn-primary,
.compact-task-item .btn-success,
.compact-task-item .btn-danger {
    padding: 4px 12px;
    font-size: 12px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 14px;
    font-weight: 600;
}

.compact-task-item .btn-primary:hover,
.compact-task-item .btn-success:hover,
.compact-task-item .btn-danger:hover {
    transform: translateY(-1px);
}

@keyframes urgentPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);
    }
}

.task-progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.task-progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width var(--transition-slow);
    border-radius: 2px;
}

.compact-task-item.active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.add-comment-form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px !important;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    align-self: flex-end;
    margin-top: 12px !important;
}

.add-comment-form .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 171, 238, 0.3);
}

.add-comment-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(42, 171, 238, 0.2);
}

.add-comment-form .btn-primary:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-comment-form .btn-primary i {
    font-size: 14px;
}

.task-actions-panel .btn-primary,
.task-actions-panel .btn-success,
.task-actions-panel .btn-danger,
.task-actions-panel .btn-secondary {
    flex: 1;
    min-width: 220px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    margin: 4px;
}

.task-actions-panel .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
}

.task-actions-panel .btn-success {
    background: linear-gradient(135deg, var(--success-color), #2caa4e);
    color: white;
}

.task-actions-panel .btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e02e24);
    color: white;
}

.task-actions-panel .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.task-actions-panel .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--info-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 171, 238, 0.4);
}

.task-actions-panel .btn-success:hover {
    background: linear-gradient(135deg, #2caa4e, #259c43);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
}

.task-actions-panel .btn-danger:hover {
    background: linear-gradient(135deg, #e02e24, #c5261e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

.task-actions-panel .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-actions-panel .btn-primary:active,
.task-actions-panel .btn-success:active,
.task-actions-panel .btn-danger:active,
.task-actions-panel .btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-actions-panel i {
    font-size: 14px;
}

.compact-task-item .btn-primary,
.compact-task-item .btn-success,
.compact-task-item .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px !important;
    border-radius: var(--radius-md);
    font-size: 12px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    height: 28px;
    margin: 4px;
    flex: 1;
}

.compact-task-item .btn-primary {
    background: var(--primary-color);
    color: white;
}

.compact-task-item .btn-success {
    background: var(--success-color);
    color: white;
}

.compact-task-item .btn-danger {
    background: var(--danger-color);
    color: white;
}

.compact-task-item .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 171, 238, 0.3);
}

.compact-task-item .btn-success:hover {
    background: #2caa4e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.compact-task-item .btn-danger:hover {
    background: #e02e24;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.compact-task-item .btn-primary:active,
.compact-task-item .btn-success:active,
.compact-task-item .btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.compact-task-item .btn-primary:disabled,
.compact-task-item .btn-success:disabled,
.compact-task-item .btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-attachments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-attachments-count:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.task-attachments-section .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: auto;
}

.task-attachments-section .btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#complete-task-form .btn-success,
#cancel-task-form .btn-danger,
#reassign-task-form .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    width: auto;
    min-width: 160px;
}

#complete-task-form .btn-success {
    background: linear-gradient(135deg, var(--success-color), #2caa4e);
    color: white;
}

#cancel-task-form .btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e02e24);
    color: white;
}

#reassign-task-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
}

#complete-task-form .btn-success:hover,
#cancel-task-form .btn-danger:hover,
#reassign-task-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#complete-task-form .btn-success:active,
#cancel-task-form .btn-danger:active,
#reassign-task-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-filters .task-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.task-filters .task-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.task-filters .task-filter:hover:not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

@keyframes buttonClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.btn-primary:active,
.btn-success:active,
.btn-danger:active,
.btn-secondary:active {
    animation: buttonClick 0.2s ease;
}

.btn-primary i,
.btn-success i,
.btn-danger i,
.btn-secondary i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .add-comment-form .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 12px 20px !important;
    }
    
    .task-actions-panel .btn-primary,
    .task-actions-panel .btn-success,
    .task-actions-panel .btn-danger,
    .task-actions-panel .btn-secondary {
        min-width: 100%;
        margin: 4px 0;
    }
    
    .compact-task-item .btn-primary,
    .compact-task-item .btn-success,
    .compact-task-item .btn-danger {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
    
    #complete-task-form .btn-success,
    #cancel-task-form .btn-danger,
    #reassign-task-form .btn-primary {
        width: 100%;
        min-width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .task-filters {
        display: flex;
        overflow-x: auto;
        gap: 4px;
        padding: 4px;
    }
    
    .task-filters .task-filter {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn-attachments-count {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .task-attachments-section .btn-secondary {
        padding: 6px 12px;
        font-size: 12px;
    }
}

.btn-primary.loading,
.btn-success.loading,
.btn-danger.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-primary.loading::after,
.btn-success.loading::after,
.btn-danger.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: buttonSpin 0.8s linear infinite;
}

@keyframes buttonSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-share-task {
    background: linear-gradient(135deg, #8a2be2, #9370db);
    color: white;
    border: none;
}

.btn-share-task:hover {
    background: linear-gradient(135deg, #7a20d2, #8360cb);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.button-group .btn-primary,
.button-group .btn-success,
.button-group .btn-danger,
.button-group .btn-secondary {
    flex: 1;
    min-width: 0;
}

.btn-primary i.fa-plus,
.btn-success i.fa-check,
.btn-danger i.fa-times,
.btn-secondary i.fa-paperclip {
    font-size: 12px;
}

#task-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#task-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

#task-form .form-group {
    margin-bottom: 0;
}

#task-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

#task-form .form-group label[required]::after {
    content: " *";
    color: var(--danger-color);
}

#task-form .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);
    box-sizing: border-box;
}

#task-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.2);
}

#task-form .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

#task-form textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

#task-form input[type="number"].form-control {
    -moz-appearance: textfield;
}

#task-form input[type="number"].form-control::-webkit-outer-spin-button,
#task-form input[type="number"].form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#task-form select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' width='16' height='16' fill='%238e8e93' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

#task-form .form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

#task-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

#task-form .btn-primary,
#task-form .btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-family: var(--font-primary);
    min-width: 120px;
}

#task-form .btn-primary {
    background: var(--primary-color);
    color: white;
}

#task-form .btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#task-form .btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

#task-form .btn-primary:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

#task-form .btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

#task-form .btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

#task-form .btn-primary.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

#task-form .btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: buttonSpin 0.8s linear infinite;
}

#task-form .form-control:invalid:not(:placeholder-shown) {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.1);
}

#task-form .form-control:valid:not(:placeholder-shown) {
    border-color: var(--success-color);
}

@media (max-width: 768px) {
    #task-form .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #task-form .form-actions {
        flex-direction: column;
    }
    
    #task-form .btn-primary,
    #task-form .btn-cancel {
        width: 100%;
        min-width: 0;
    }
    
    #task-form .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #task-form textarea.form-control {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    #task-form .form-control {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    #task-form .btn-primary,
    #task-form .btn-cancel {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@keyframes fieldAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#task-form .form-group {
    animation: fieldAppear 0.3s ease forwards;
    opacity: 0;
}

#task-form .form-group:nth-child(1) { animation-delay: 0.1s; }
#task-form .form-group:nth-child(2) { animation-delay: 0.2s; }
#task-form .form-row .form-group:nth-child(1) { animation-delay: 0.3s; }
#task-form .form-row .form-group:nth-child(2) { animation-delay: 0.4s; }
#task-form .form-group:nth-child(4) { animation-delay: 0.5s; }
#task-form .form-actions { animation: fieldAppear 0.3s ease 0.6s forwards; opacity: 0; }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

.fullscreen-modal {
    padding: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    align-items: flex-start;
    justify-content: flex-start;
}

.fullscreen-modal .modal-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    margin: auto;
    animation: modalFadeIn 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .modal {
        padding: 10px;
        align-items: flex-end;
    }
    
    .modal-content {
        max-width: calc(100% - 20px);
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
}

.chat-item-last-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
}

.chat-item-last-message.has-long-content {
    font-size: 13px;
}

.chat-item-last-message.with-emoji {
    line-height: 1.6;
}

.chat-item-last-message:has(📎) {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-item-last-message:has(📎)::before {
    content: "📎";
    font-size: 12px;
    flex-shrink: 0;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    min-height: 72px;
}

.chat-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.chat-item-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.chat-item-name span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-item-last-message {
    font-family: var(--font-primary), "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

@media (max-width: 768px) {
    .chat-item-last-message {
        font-size: 13px;
        -webkit-line-clamp: 2;
        max-height: 2.6em;
    }
    
    .chat-item {
        padding: 10px 16px;
        min-height: 68px;
    }
}

.chat-item-last-message.very-long {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.chat-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.chat-item-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.chat-item-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#chat-members-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

#chat-members-modal[style*="display: block"] {
    display: flex;
}

#chat-members-modal .modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.25s ease;
}

#chat-members-modal .modal-header {
    background: #239508;
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

#chat-members-modal .modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    text-align: center;
    letter-spacing: 0.3px;
}

#chat-members-modal .modal-header .close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

#chat-members-modal .modal-header .close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#chat-members-modal .modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    background: #f5f5f5;
}

#chat-members-modal .members-list {
    background: white;
}

#chat-members-modal .member-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e6e6e6;
    transition: background-color 0.2s;
    min-height: 60px;
}

#chat-members-modal .member-item:last-child {
    border-bottom: none;
}

#chat-members-modal .member-item:hover {
    background-color: #f8f8f8;
}

#chat-members-modal .member-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid #e0e0e0;
}

#chat-members-modal .member-info {
    flex: 1;
    min-width: 0;
}

#chat-members-modal .member-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#chat-members-modal .member-status {
    font-size: 13px;
    display: flex;
    align-items: center;
}

#chat-members-modal .member-status.online {
    color: #4caf50;
}

#chat-members-modal .member-status.online::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4caf50;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

#chat-members-modal .member-status.offline {
    color: #999;
}

#chat-members-modal .member-status.offline::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    margin-right: 6px;
}

#chat-members-modal .member-role {
    font-size: 13px;
    color: #666;
    text-align: right;
    margin-left: 12px;
    white-space: nowrap;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#chat-members-modal .btn-danger {
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 6px;
}

#chat-members-modal .btn-danger:hover {
    background: #ff1c1c;
    transform: translateY(-1px);
}

#chat-members-modal .btn-danger:active {
    transform: translateY(0);
}

#chat-members-modal .btn-danger i {
    font-size: 12px;
}

#chat-members-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#chat-members-modal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#chat-members-modal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#chat-members-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@media (max-width: 768px) {
    #chat-members-modal .modal-content {
        width: 95%;
        max-height: 85vh;
        margin-top: auto;
        margin-bottom: 0;
        animation: slideUpMobile 0.3s ease;
    }
    
    #chat-members-modal {
        align-items: flex-end;
    }
    
    #chat-members-modal .modal-header {
        padding: 18px 20px;
    }
    
    #chat-members-modal .member-item {
        padding: 14px 16px;
    }
    
    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #chat-members-modal .modal-content {
        max-width: 450px;
    }
}

#chat-members-modal .members-list:empty::before {
    content: 'Нет участников';
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
}

#chat-members-modal .members-list.loading .member-item {
    opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
    #chat-members-modal .modal-content {
        background: #1e1e1e;
        color: #ffffff;
    }
    
    #chat-members-modal .modal-body {
        background: #121212;
    }
    
    #chat-members-modal .members-list {
        background: #1e1e1e;
    }
    
    #chat-members-modal .member-item {
        border-bottom-color: #2a2a2a;
    }
    
    #chat-members-modal .member-item:hover {
        background-color: #2a2a2a;
    }
    
    #chat-members-modal .member-name {
        color: #ffffff;
    }
    
    #chat-members-modal .member-role {
        background: #2a2a2a;
        color: #cccccc;
    }
    
    #chat-members-modal .modal-body::-webkit-scrollbar-track {
        background: #2a2a2a;
    }
    
    #chat-members-modal .modal-body::-webkit-scrollbar-thumb {
        background: #444444;
    }
}
/* Добавьте в style2.css или style4.css */

/* Индикатор свайпа для мобильной версии */
.chat-item-swipe-indicator {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(135deg, #ff3b30, #ff6b6b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0 12px 12px 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 5;
    gap: 4px;
}

.chat-item-swipe-indicator i {
    font-size: 16px;
}

.chat-item.swiping .chat-item-swipe-indicator {
    transform: translateX(0);
    pointer-events: auto;
}

/* Крестик для выхода на ПК */
.chat-item-leave-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.1);
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 1025px) {
    .chat-item:hover .chat-item-leave-btn {
        opacity: 1;
        pointer-events: auto;
    }
    
    .chat-item-leave-btn:hover {
        background: var(--danger-color);
        color: white;
        transform: translateY(-50%) scale(1.1);
    }
}

.chat-item-leave-btn i {
    font-size: 14px;
}

/* Для групповых чатов другой цвет */
.chat-item.is-group .chat-item-leave-btn {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning-color);
}

.chat-item.is-group .chat-item-leave-btn:hover {
    background: var(--warning-color);
    color: white;
}

/* Анимация удаления */
.chat-item.removing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Модальное окно подтверждения выхода */
.leave-chat-confirm-modal .modal-content {
    max-width: 400px;
}

.leave-chat-confirm-modal .modal-body {
    text-align: center;
    padding: 32px;
}

.leave-chat-confirm-modal .warning-icon {
    font-size: 48px;
    color: var(--danger-color);
    margin-bottom: 16px;
}

.leave-chat-confirm-modal h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.leave-chat-confirm-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.leave-chat-confirm-modal .chat-info {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.leave-chat-confirm-modal .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.leave-chat-confirm-modal .chat-details {
    flex: 1;
    text-align: left;
}

.leave-chat-confirm-modal .chat-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.leave-chat-confirm-modal .chat-type {
    font-size: 12px;
    color: var(--text-muted);
}

.leave-chat-confirm-modal .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.leave-chat-confirm-modal .btn-cancel {
    min-width: 120px;
}

.leave-chat-confirm-modal .btn-danger {
    min-width: 120px;
}
/* ===== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА СОЗДАНИЯ ЧАТА ===== */

#create-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

#create-chat-modal[style*="display: block"] {
    display: flex !important;
}

#create-chat-modal .modal-content {
    background: var(--tg-bg-color, #ffffff);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    animation: modalFadeIn 0.2s ease;
    overflow: hidden;
}

#create-chat-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--tg-border-color, #e5e5ea);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#create-chat-modal .modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--tg-text-color, #000000);
    margin: 0;
}

#create-chat-modal .modal-header .close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tg-secondary-bg-color, #f2f2f7);
    border: none;
    color: var(--tg-hint-color, #8e8e93);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.1s ease;
    line-height: 1;
    padding: 0;
}

#create-chat-modal .modal-header .close:hover {
    background: var(--tg-secondary-bg-color, #e5e5ea);
    color: var(--tg-text-color, #000000);
}

#create-chat-modal .modal-body {
    padding: 24px;
}

#create-chat-modal .form-group {
    margin-bottom: 20px;
}

#create-chat-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

#create-chat-modal .form-group > div[style*="display: flex"] {
    display: flex !important;
    gap: 20px !important;
    margin-top: 4px;
}

#create-chat-modal .form-group > div[style*="display: flex"] label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px;
    background: var(--tg-secondary-bg-color, #f2f2f7);
    border: 1px solid var(--tg-border-color, #e5e5ea);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.1s ease;
    margin-bottom: 0;
    font-weight: normal;
    font-size: 14px;
    color: var(--tg-text-color, #000000);
}

#create-chat-modal .form-group > div[style*="display: flex"] label:hover {
    background: var(--tg-secondary-bg-color, #e5e5ea);
}

#create-chat-modal .form-group > div[style*="display: flex"] input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--tg-accent-color, #239508);
    margin: 0;
    cursor: pointer;
}

#create-chat-modal .form-group > div[style*="display: flex"] input[type="radio"]:checked {
    accent-color: var(--tg-accent-color, #239508);
}

#create-chat-modal .form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--tg-secondary-bg-color, #f2f2f7);
    border: 1px solid var(--tg-border-color, #e5e5ea);
    border-radius: 10px;
    color: var(--tg-text-color, #000000);
    font-size: 15px;
    font-family: inherit;
    transition: border 0.1s ease;
    box-sizing: border-box;
}

#create-chat-modal .form-control:focus {
    border-color: var(--tg-accent-color, #239508);
    outline: none;
}

#create-chat-modal .form-control::placeholder {
    color: var(--tg-hint-color, #8e8e93);
}

#create-chat-modal select[multiple].form-control {
    height: 200px !important;
    padding: 8px;
    overflow-y: auto;
    background: var(--tg-secondary-bg-color, #f2f2f7);
}

#create-chat-modal select[multiple].form-control option {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 2px;
    background: var(--tg-bg-color, #ffffff);
    color: var(--tg-text-color, #000000);
    font-size: 14px;
    cursor: pointer;
}

#create-chat-modal select[multiple].form-control option:hover {
    background: var(--tg-secondary-bg-color, #e5e5ea);
}

#create-chat-modal select[multiple].form-control option:checked {
    background: var(--tg-accent-color, #239508);
    color: white;
}

#create-chat-modal .form-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--tg-hint-color, #8e8e93);
}

#create-chat-modal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--tg-border-color, #e5e5ea);
}

#create-chat-modal .btn-cancel,
#create-chat-modal .btn-primary {
    min-width: 100px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    transition: opacity 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

#create-chat-modal .btn-primary {
    background: var(--tg-accent-color, #239508);
    color: white;
}

#create-chat-modal .btn-primary:hover {
    opacity: 0.9;
}

#create-chat-modal .btn-cancel {
    background: var(--tg-secondary-bg-color, #f2f2f7);
    color: var(--tg-text-color, #000000);
    border: 1px solid var(--tg-border-color, #e5e5ea);
}

#create-chat-modal .btn-cancel:hover {
    background: var(--tg-secondary-bg-color, #e5e5ea);
}

/* Анимация */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Переменные для светлой темы (по умолчанию) */
#create-chat-modal {
    --tg-bg-color: #ffffff;
    --tg-text-color: #000000;
    --tg-hint-color: #8e8e93;
    --tg-secondary-bg-color: #f2f2f7;
    --tg-border-color: #e5e5ea;
    --tg-accent-color: #239508;
}

/* Медиа-запросы */
@media (max-width: 768px) {
    #create-chat-modal .modal-content {
        max-width: calc(100% - 32px);
        margin: 16px;
    }
    
    #create-chat-modal .modal-header {
        padding: 16px 20px;
    }
    
    #create-chat-modal .modal-body {
        padding: 20px;
    }
    
    #create-chat-modal .form-group > div[style*="display: flex"] {
        gap: 12px !important;
    }
    
    #create-chat-modal .form-group > div[style*="display: flex"] label {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    #create-chat-modal .form-actions {
        padding: 16px 0 0;
    }
}

@media (max-width: 480px) {
    #create-chat-modal .form-group > div[style*="display: flex"] {
        flex-direction: column;
        gap: 8px !important;
    }
    
    #create-chat-modal .form-group > div[style*="display: flex"] label {
        width: 100%;
        justify-content: center;
    }
    
    #create-chat-modal .form-control {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    #create-chat-modal .btn-cancel,
    #create-chat-modal .btn-primary {
        flex: 1;
        min-width: 0;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    #create-chat-modal {
        --tg-bg-color: #1e1e1e;
        --tg-text-color: #ffffff;
        --tg-hint-color: #8e8e93;
        --tg-secondary-bg-color: #2d2d2d;
        --tg-border-color: #3a3a3a;
        --tg-accent-color: #239508;
    }
    
    #create-chat-modal select[multiple].form-control option {
        background: #1e1e1e;
    }
    
    #create-chat-modal select[multiple].form-control option:hover {
        background: #2d2d2d;
    }
}
.skeleton-game {
    height: 320px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--radius-xl);
}