/* Стили для профиля пользователя */
.user-profile {
    text-align: center;
    padding: 20px;
}

.user-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--accent-primary);
}

.user-profile-info {
    margin-bottom: 20px;
}

.user-profile-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.user-profile-details {
    display: grid;
    gap: 10px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.user-profile-detail {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.user-profile-detail i {
    width: 20px;
    margin-right: 10px;
    color: var(--accent-primary);
}

.user-profile-detail span {
    font-weight: 500;
    color: var(--text-primary);
}

.user-profile-detail .value {
    margin-left: auto;
    color: var(--text-secondary);
}

/* Основные переменные */
:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: #1e1e2e;
    --bg-modal: rgba(0, 0, 0, 0.8);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    
    --border-color: #2d2d3a;
    --border-hover: #3d3d4a;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Основная структура */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Навигация */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #18182a;
    padding: 0 32px;
    height: 56px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-link {
    display: flex;
    align-items: center;
    color: #a7a7ff;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    gap: 8px;
    transition: color 0.2s;
}
.brand-link:hover {
    color: #fff;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #e0e0ff;
    font-size: 1rem;
    font-weight: 500;
    background: none;
    border: none;
    outline: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.nav-link:hover, .nav-link:focus {
    background: #23234a;
    color: #fff;
}

.nav-link.active {
    background: #23234a;
    color: #fff;
}

/* Кнопка выхода */
.nav-link:last-child {
    margin-left: 12px;
    background: #fff;
    color: #23234a;
    border: 1px solid #d1d1ff;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.nav-link:last-child:hover {
    background: #f5f5ff;
    color: #18182a;
    border: 1px solid #a7a7ff;
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 8px 8px;
    }
    .navbar-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    .nav-link {
        width: 100%;
        justify-content: flex-start;
    }
    .nav-link:last-child {
        min-width: unset;
        min-height: unset;
        width: auto;
        padding: 8px 16px;
        font-size: 1rem;
        margin-left: 0;
    }
    .navbar-menu {
        overflow-x: auto;
        width: 100%;
    }
}

/* Основной контент */
.main-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Аутентификация */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.auth-header p {
    color: #aaa;
    font-size: 16px;
    margin: 0;
}

.auth-form {
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

.auth-form .form-group input {
    width: 100%;
    padding: 12px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form .form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
}

/* Основные стили кнопок */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-danger {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

.btn-danger:hover:not(:disabled) {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.btn-success {
    background-color: #059669;
    color: white;
    border-color: #059669;
}

.btn-success:hover:not(:disabled) {
    background-color: #047857;
    border-color: #047857;
}

.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.auth-footer p {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #5a67d8;
}

/* Адаптивность для авторизации */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-header p {
        font-size: 14px;
    }
}

/* Дашборд */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-owner {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.project-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-modal);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Столбцы */
.column-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.column-input input {
    flex: 1;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background-color: var(--accent-success);
}

.notification.error {
    background-color: var(--accent-danger);
}

.notification.info {
    background-color: var(--accent-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Канбан доска */
.project-page {
    width: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.project-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.project-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.kanban-column {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.column-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.task-count {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.column-content {
    flex: 1;
    min-height: 200px;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--bg-tertiary);
    transition: background-color 0.2s ease;
}

.column-content.drag-over {
    background-color: var(--border-hover);
}

/* Задачи */
.task-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
}

.task-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    cursor: grabbing;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.task-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    margin-right: 0.5rem;
}

.task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-icon.delete {
    color: #ff6b6b;
}

.btn-icon.delete:hover {
    background-color: rgba(255, 107, 107, 0.1);
    color: #ff5252;
}

.task-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.task-assigned,
.task-deadline {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-deadline.overdue {
    color: var(--accent-danger);
}

/* Профиль */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header {
    margin-bottom: 30px;
    text-align: center;
}

.profile-header h1 {
    color: #fff;
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

.profile-content {
    display: grid;
    gap: 30px;
}

.profile-section {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.profile-section h2 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

/* Стили для аватара */
.avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.avatar-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #2a2a2a;
    border: 3px solid #444;
    transition: all 0.3s ease;
}

.avatar-preview:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-preview:hover .avatar-overlay {
    opacity: 1;
}

.avatar-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
}

.avatar-upload-btn i {
    font-size: 20px;
    color: #667eea;
}

/* Стили для чекбоксов */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #2a2a2a;
    border: 2px solid #444;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

/* Улучшения для форм в профиле */
.profile-section .form-group {
    margin-bottom: 20px;
}

.profile-section .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

.profile-section .form-group input {
    width: 100%;
    padding: 12px 15px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
}

.profile-section .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profile-section .form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

/* Улучшения для кнопок в профиле */
.profile-section .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

/* Настройки уведомлений */
.notification-settings {
    padding: 0;
}

.notification-settings .form-group {
    margin-bottom: 15px;
}

/* Адаптивность для профиля */
@media (max-width: 768px) {
    .profile-page {
        padding: 15px;
    }
    
    .profile-section {
        padding: 20px;
    }
    
    .profile-section .form-actions {
        flex-direction: column;
    }
    
    .profile-section .form-actions .btn {
        width: 100%;
    }
    
    .avatar-preview {
        width: 100px;
        height: 100px;
    }
}

/* Улучшения для навигации */
.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2a2a2a;
    border: 1px solid #444;
    overflow: hidden;
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-username {
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

/* Улучшения для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 1000;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #38a169;
}

.notification.error {
    background: #e53e3e;
}

.notification.info {
    background: #3182ce;
}

.notification.hiding {
    animation: slideOut 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Улучшения для загрузки */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #888;
}

.loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Страница ошибки */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.error-content {
    text-align: center;
    background-color: var(--bg-card);
    border-radius: 1rem;
    padding: 3rem 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.error-icon {
    font-size: 4rem;
    color: var(--accent-warning);
    margin-bottom: 1rem;
}

.error-content h1 {
    font-size: 6rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.error-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        max-width: 95vw;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
    }
    
    .project-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .project-actions {
        justify-content: stretch;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .kanban-column {
        min-height: 300px;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .error-content h1 {
        font-size: 4rem;
    }
}

/* Модальное окно управления правами доступа */
.permissions-content {
    padding: 20px;
}

.permissions-list {
    margin-top: 30px;
    border-top: 1px solid #444;
    padding-top: 20px;
}

.permissions-list h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 16px;
}

.permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 10px;
}

.permission-user {
    font-weight: 500;
    color: #fff;
}

.permission-level {
    background: #4a5568;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

/* Улучшения для модальных окон */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.column-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.column-input input {
    flex: 1;
}

.column-input .btn {
    flex-shrink: 0;
}

/* Улучшения для карточек задач */
.task-card {
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.task-card.dragging {
    cursor: grabbing;
    transform: rotate(5deg);
    opacity: 0.8;
}

.task-actions {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-icon:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Улучшения для кнопок */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Анимации для уведомлений */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification {
    animation: slideIn 0.3s ease;
}

.notification.hiding {
    animation: slideOut 0.3s ease;
}

/* Улучшения для форм */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Улучшения для кнопок действий */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* Улучшения для заголовков проектов */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
}

.project-info h1 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 28px;
    font-weight: 600;
}

.project-info p {
    margin: 0;
    color: #aaa;
    font-size: 16px;
    line-height: 1.5;
}

.project-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Адаптивность */
@media (max-width: 768px) {
    .project-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .project-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .project-actions .btn {
        flex: 1;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
        max-width: 95vw;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Темы для разных уровней прав */
.permission-level.view {
    background: #4a5568;
}

.permission-level.create {
    background: #38a169;
}

.permission-level.edit {
    background: #d69e2e;
}

.permission-level.delete {
    background: #e53e3e;
}

/* Улучшения для канбан доски */
.kanban-column {
    min-height: 400px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
    transition: border-color 0.2s ease;
}

.kanban-column:hover {
    border-color: #444;
}

.column-header {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.task-count {
    background: #4a5568;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.column-content {
    padding: 15px;
    min-height: 300px;
}

.column-content:empty::after {
    content: "Перетащите задачи сюда";
    display: block;
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Улучшения для карточек задач */
.task-card {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.task-card:last-child {
    margin-bottom: 0;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-header h4 {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    margin-right: 10px;
}

.task-description {
    color: #aaa;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
}

.task-assigned,
.task-deadline {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
}

.task-deadline.overdue {
    color: #e53e3e;
}

.task-deadline.overdue i {
    color: #e53e3e;
}

/* Стили для файлов задач */
.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-item i {
    color: #667eea;
    font-size: 1.2rem;
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    color: #fff;
    word-break: break-word;
}

.file-size {
    font-size: 0.8rem;
    color: #888;
}

.file-actions {
    display: flex;
    gap: 4px;
}

.file-upload {
    margin-top: 8px;
}

.task-title {
    transition: color 0.2s;
}

.task-title:hover {
    color: #667eea;
}

/* Улучшения для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 1000;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.notification.success {
    background: #38a169;
}

.notification.error {
    background: #e53e3e;
}

.notification.info {
    background: #3182ce;
}

/* Улучшения для загрузки */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #888;
}

.loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для главной страницы */
.home-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.home-container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.home-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.home-header h1 {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.home-header h1 i {
    color: #667eea;
    margin-right: 15px;
}

.home-header > p {
    color: #aaa;
    font-size: 20px;
    margin: 0 0 40px 0;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature {
    padding: 20px;
    background: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.feature i {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 15px;
}

.feature h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.feature p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.home-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Адаптивность для главной страницы */
@media (max-width: 768px) {
    .home-content {
        padding: 30px 20px;
    }
    
    .home-header h1 {
        font-size: 36px;
    }
    
    .home-header > p {
        font-size: 16px;
    }
    
    .home-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .home-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
}

/* Chat Styles */



/* Стили для чата задачи */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    max-height: 70vh;
    width: 600px;
    max-width: 90vw;
    margin: 0 auto;
    border: 2px dashed transparent;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.chat-container.drag-over {
    border-color: var(--accent-primary);
    background-color: rgba(99, 102, 241, 0.05);
}

/* Подсказка для drag & drop */
.chat-container::before {
    content: "Перетащите файл сюда";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.chat-container.drag-over::before {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1rem;
    max-height: 400px;
    min-width: 500px;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    position: relative;
}

.chat-message.own {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    margin-left: 2rem;
}

.chat-message:not(.own) {
    margin-right: 2rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    font-weight: 600;
    font-size: 0.875rem;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.username:hover {
    color: #232323;
    text-decoration: underline;
}

.message-time {
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 500;
}

.message-content {
    color: var(--text-primary);
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.own .message-content {
    color: #ffffff;
}

.chat-input {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-group button {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    background: var(--accent-primary);
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.input-group button:hover {
    background: #5855eb;
}

.no-messages {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.no-messages p {
    font-style: italic;
}

/* Адаптивность для чата */
@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        min-width: unset;
        max-width: 100vw;
    }
    .chat-messages {
        min-width: unset;
    }
}

/* Стили для упоминаний в чате */
.mention-dropdown {
    background: #fff;
    color: #23234a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    min-width: 200px;
}

.mention-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.mention-item:hover {
    background-color: #e3f2fd;
}

.mention-item:last-child {
    border-bottom: none;
}

.mention-item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-item span {
    color: #23234a;
    font-weight: 500;
}

/* Стили для упоминаний в сообщениях */
.message-content .mention {
    background-color: var(--accent-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
}

.message-content .mention:hover {
    background-color: var(--accent-secondary);
}

.edit-message-input {
    width: 100%;
    min-height: 60px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    font-size: 1rem;
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    resize: vertical;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-icon.edit {
    color: #ffffff;
}

.btn-icon.edit:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Стили для файлов в чате */
.message-file {
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-file img {
    border-radius: 4px;
    transition: transform 0.2s;
}

.message-file img:hover {
    transform: scale(1.05);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.file-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-word;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-top: 8px;
    border: 1px solid var(--border-color);
}

.file-preview span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Стили для модального окна изображений */
.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Адаптивность для файлов в чате */
@media (max-width: 768px) {
    .message-file {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .message-file img {
        max-width: 150px;
        max-height: 150px;
    }
}

/* Стили для редактирования файлов в сообщениях */
.file-edit-controls {
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.file-edit-controls label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.current-file {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg-card);
    border-radius: 4px;
}

.current-file span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.new-file {
    margin-bottom: 8px;
}

.new-file input[type="file"] {
    margin-bottom: 8px;
    width: 100%;
}

.edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.edit-actions .btn {
    flex: 1;
} 