/* TaskFlow - Main CSS */

/* Подключение шрифтов */
@import url('font.css');

/* Reset and Base Styles */

.task-description {
    color: #666;
    font-size: 14px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
    background: #f8f9fa;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Исправляем touch-действия для всех интерактивных элементов */
button, input, select, textarea, a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    font-weight: 500;
}

h2 {
    font-size: 1.4rem;
    font-weight: 500;
}

h3 {
    font-size: 1rem;
    font-weight: 500;
}

h4 {
    font-size: 0.9rem;
    font-weight: 500;
}

h5 {
    font-size: 0.7rem;
    font-weight: 500;
}

h6 {
    font-size: 0.5rem;
    font-weight: 500;
}

p {
	font-size:12px;
	color:#8791a0;
}

/* Принудительное применение шрифтов для всех элементов */
*, *::before, *::after {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

/* Дополнительные стили для элементов */
body, html,
p, span:not(.fas):not(.far):not(.fal):not(.fab), div, a, button, input, select, textarea, label,
ul, ol, li, table, th, td,
.btn, .form-control, .nav-link, .dropdown-item,
.card, .card-body, .card-title, .card-text,
.modal, .modal-body, .modal-title, .modal-header, .modal-footer {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

/* Bootstrap переопределения */
.btn, .form-control, .form-select, .form-check-label, .form-label {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

/* Quill редактор */
.ql-editor, .ql-editor * {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

/* Исключения для иконок */
.fas, .far, .fal, .fab, 
i.fas, i.far, i.fal, i.fab,
span.fas, span.far, span.fal, span.fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

svg.icon.icon-tabler {
    display: block;
    font-size: 12px;
    width: 20px;
}

/* Специфичные стили для сайдбара */
.sidebar-header h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 5px !important;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
    letter-spacing: 0.5px;
}

.sidebar-header p {
    font-size: 10px !important;
    color: #6b7280 !important;
    margin: 0 !important;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

.sidebar .stats-section .stats-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

.sidebar .stats-section .stat-item {
    font-size: 14px !important;
    color: #4b5563 !important;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

.sidebar .stats-section .stat-value {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #374151 !important;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

.sidebar .nav-section-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

.sidebar .nav-item, .sidebar .nav-item span:not(.fas):not(.far):not(.fal):not(.fab) {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

.sidebar * {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
	font-size: 12px;
	    font-weight: 400;
}

.sidebar .fas, .sidebar .far, .sidebar .fal, .sidebar .fab,
.sidebar i.fas, .sidebar i.far, .sidebar i.fal, .sidebar i.fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

.sidebar .profile-avatar {
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
    font-weight: bold !important;
}

.stat-item span {
    text-align: left !important;
}

/* Colors */
:root {
    --primary-color: #5c4dff;
    --primary-hover: #a49cff;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --success-hover: #218838;
    --danger-color: #dc3545;
    --danger-hover: #c82333;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Main Container - общий для всех страниц */
.main-container {
    display: flex;
    height: 100vh;
    background: #f1f1f9;
}

/* Общие стили для всех средних колонок (списки) */
.task-list,
.project-list,
.teams-list,
.user-list,
.chats-list {
    width: 540px;
    display: flex;
    flex-direction: column;
    background: #ffffff66;
    border-right: 1px solid #efefef;
}

/* Общие стили для всех правых колонок (детали) */
.project-details,
.team-details,
.user-details,
.chat-area {
    flex: 1;
    background: #fff;
    overflow-y: auto;
	max-width: 40%;
}

/* Buttons - Унифицированные стили */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

.btn-primary {
background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover)!important;
    color: white !important;
    text-decoration: none !important;
}

.btn-primary:focus {
    background-color: #ccb2ff !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2) !important;
}

.btn-secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-success {
    background: var(--primary-color) !important;
    color: white !important;
}

.btn-success:hover {
    background-color: var(--primary-hover) !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.btn-danger:hover {
    background-color: #c82333 !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-info {
    background-color: #32af07 !important;
    color: white !important;
}

.btn-info:hover {
    background-color: #138496 !important;
    color: white !important;
    text-decoration: none !important;
}

.btn-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.btn-warning:hover {
    background-color: #e0a800 !important;
    color: #212529 !important;
    text-decoration: none !important;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
	background: var(--primary-color);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-secondary {
    background: var(--gray-color);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
	width: 100%;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Stolzl', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px var(--shadow-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: var(--success-color);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: var(--warning-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--info-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 600px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.close:hover {
    color: #333;
}

/* Statistics */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
	    border: 2px solid #f3f4f6;
		flex:1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--gray-color);
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-color);
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background: var(--light-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    color: white;
}

.badge-primary {
    background: var(--primary-color);
}

.badge-success {
    background: var(--success-color);
}

.badge-danger {
    background: var(--danger-color);
}

.badge-warning {
    background: var(--warning-color);
    color: #333;
}

.badge-info {
    background: var(--info-color);
}

.badge-secondary {
    background: var(--gray-color);
}

/* Loading */
.loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--info-color);
}

.text-muted {
    color: var(--gray-color);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-inline-block {
    display: inline-block;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 3rem; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-color);
}

.empty-state h3 {
    color: #999;
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
} 

/* Единая система стилей для аватаров */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Размеры аватаров */
.user-avatar.small {
    width: 24px;
    height: 24px;
    font-size: 10px;
    border-width: 1px;
}

.user-avatar.default {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-width: 2px;
}

.user-avatar.medium {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-width: 2px;
}

.user-avatar.large {
    width: 48px;
    height: 48px;
    font-size: 18px;
    border-width: 2px;
}

/* Аватары для комментариев */
.comment-avatar,
.comment-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comment-avatar img,
.comment-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Аватары участников */
.member-avatar,
.assignee-avatar,
.creator-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-right: 8px;
}

.member-avatar img,
.assignee-avatar img,
.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Аватары в активности */
.activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-right: 12px;
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Аватары в списках участников */
.members-list .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 10px;
    border-width: 2px;
    margin-right: 4px;
}

/* Аватары в профиле (большие) */
.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 32px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    margin-right: 20px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Аватары в хедере */
.header .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
    border-width: 2px;
    margin-right: 10px;
}

/* Аватары в сайдбаре */
.sidebar .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-width: 1px;
    margin-right: 8px;
}

/* Анимация при наведении */
.user-avatar:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Состояние онлайн */
.user-avatar.online::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #dbd8fe;
    border-radius: 50%;
    border: 2px solid white;
} 

/* Font Awesome иконки */
.fas, .far, .fal, .fab {
    margin-right: 8px;
    font-size: 1em;
    color: inherit;
}

/* Иконки в навигации */
.nav-item .fas {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* Иконки в кнопках */
.btn .fas {
    margin-right: 5px;
}

/* Иконки в заголовках */
.card-title .fas {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Иконки логотипа */
.logo .fas {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Иконки в dropdown */
.dropdown-menu .fas {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Иконки в sidebar */
.sidebar .fas {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Иконки в empty state */
.empty-state-icon .fas {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-light);
}

/* Иконки в настройках */
.settings-item-icon .fas {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

/* Иконки в activity */
.activity-avatar .fas {
    font-size: 14px;
    color: var(--primary-color);
} 

.section-header {
    padding-bottom: 15px;
}

/* Адаптив для ноутбуков */
@media (max-width: 1366px) {
    .main-container {
        gap: 0;
		height: auto;
    }
    
    /* Общие стили для всех средних колонок */
    .task-list,
    .project-list,
    .teams-list,
    .user-list,
    .chats-list {
        width: 250px;
    }
    
    /* Общие стили для всех правых панелей */
    .project-details,
    .team-details,
    .user-details,
    .chat-area {
        min-width: 250px;
	    max-width: 100%;
    }
}

/* Мобильная версия */
@media (max-width: 768px) {
    html, body {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    body {
        padding-top: 60px;
    }
    
    .main-container {
        flex-direction: column;
        height: calc(100vh - 60px);
        padding-top: 0;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Мобильные стили для всех колонок */
    .task-list,
    .project-list,
    .teams-list,
    .user-list,
    .chats-list {
        width: 100%;
        max-height: 40vh;
    }
    
    .task-details,
    .project-details,
    .team-details,
    .user-details,
    .chat-area {
        width: 100%;
        flex: 1;
    }
    
    /* Специальная адаптивность для мессенджера */
    .chats-list {
        height: 50%;
        max-height: 50vh;
    }
    
    .chat-area {
        height: 50%;
        max-height: 50vh;
    }
    
    /* Переопределяем стили для всех основных контейнеров */
    .main-content,
    .settings-panel,
    .profile-details {
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 15px 20px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Списки на всю ширину */
    .task-list,
    .project-list,
    .user-list {
        width: 100vw !important;
        max-width: 100vw !important;
        height: auto !important;
        min-height: calc(100vh - 60px) !important;
        border-right: none !important;
        border-bottom: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }
    
    /* Скрываем детальные панели на мобильных */
    .task-details,
    .project-details,
    .user-details {
        display: none;
    }
    
    /* Мобильные карточки */
    .task-item,
    .project-item,
    .user-item {
        padding: 16px 20px;
        margin: 0 0 8px 0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        background: white;
        border: 1px solid #f0f0f0;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        z-index: 1;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        width: 100%;
        box-sizing: border-box;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        display: block;
        visibility: visible;
        opacity: 1;
    }
    
    .task-item:hover,
    .project-item:hover,
    .user-item:hover,
    .task-item:active,
    .project-item:active,
    .user-item:active,
    .task-item.touch-active,
    .project-item.touch-active,
    .user-item.touch-active {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        background: #f8fafc;
    }
    
    /* Убираем блокировку событий - это создавало проблемы */
    
    /* Обеспечиваем кликабельность основных элементов */
    .task-item,
    .project-item,
    .user-item {
        pointer-events: auto;
        cursor: pointer;
    }
    
    .task-item button,
    .project-item button,
    .user-item button,
    .task-item a,
    .project-item a,
    .user-item a {
        pointer-events: auto;
        position: relative;
        z-index: 2;
    }
    

    
    /* Мобильные заголовки */
    .task-title,
    .project-title {
        font-size: 20px;
        padding: 20px;
        background: white;
        border-bottom: 1px solid #e2e8f0;
        margin: 0;
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Мобильные фильтры */
    .filters {
        padding: 16px 20px;
        background: white;
        border-bottom: 1px solid #e2e8f0;
        position: sticky;
        top: 60px;
        z-index: 99;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .filter-select {
        flex: 1;
        min-width: 120px;
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 8px;
        pointer-events: auto;
        touch-action: manipulation;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 44px;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        cursor: pointer !important;
        border: none;
        background: #3b82f6;
        color: white;
        font-weight: 500;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        user-select: none;
        -webkit-user-select: none;
    }
    
    .btn:hover,
    .btn:active {
        background: #2563eb;
        transform: translateY(-1px);
    }
    
    .btn-primary {
        background: #3b82f6;
        color: white;
    }
    
    .btn-primary:hover,
    .btn-primary:active {
        background: #2563eb;
    }
    
    /* Мобильные уведомления */
    .alert {
        margin: 16px 20px;
        padding: 16px;
        border-radius: 12px;
        font-size: 16px;
        width: calc(100% - 40px);
        box-sizing: border-box;
    }
    
    /* Пустые состояния */
    .empty-state {
        padding: 40px 20px;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .empty-state-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }
    
    .empty-state h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .empty-state p {
        font-size: 16px;
        color: #6b7280;
    }
    
    /* Исправляем все интерактивные элементы */
    a, button, input, select, textarea {
        pointer-events: auto;
        touch-action: manipulation;
    }
    
    /* Исправляем проблему с профилем - скрываем дублирующий сайдбар */
    .profile-details .sidebar {
        display: none !important;
    }

    /* Исправляем все формы и инпуты */
    form, input, select, textarea, button {
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
}

/* Мобильные стили для модального окна проекта */
.project-header-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.project-color-mobile {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.project-header-mobile h3 {
    flex: 1;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.project-status-mobile {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: white;
}

.project-status-mobile.status-active {
    background: #dbd8fe;
}

.project-status-mobile.status-completed {
    background: #6b7280;
}

.project-status-mobile.status-paused {
    background: #f59e0b;
}

.project-status-mobile.status-cancelled {
    background: #ef4444;
}

.project-description-mobile {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.project-description-mobile p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.project-stats-mobile {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.project-tasks-mobile {
    margin-bottom: 20px;
}

.project-tasks-mobile h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.tasks-list-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-item-mobile:hover {
    background: #f8fafc;
    border-color: #3b82f6;
}

.task-priority-mobile {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-priority-mobile.priority-urgent {
    background: #dc2626;
}

.task-priority-mobile.priority-high {
    background: #ef4444;
}

.task-priority-mobile.priority-medium {
    background: #f59e0b;
}

.task-priority-mobile.priority-low {
    background: #dbd8fe;
}

.task-info-mobile {
    flex: 1;
}

.task-title-mobile {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
}

.task-status-mobile {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    color: white;
}

.task-status-mobile.status-todo {
    background: #f59e0b;
}

.task-status-mobile.status-in_progress {
    background: #3b82f6;
}

.task-status-mobile.status-review {
    background: #8b5cf6;
}

.task-status-mobile.status-done {
    background: #dbd8fe;
}

.project-members-mobile {
    margin-bottom: 20px;
}

.project-members-mobile h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.members-list-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-item-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.member-avatar-mobile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.member-info-mobile {
    flex: 1;
}

.member-name-mobile {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
}

.member-role-mobile {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
}