* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-light: #475569;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Утилиты */
.hidden {
    display: none !important;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-toggle {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-toggle.active {
    background: var(--primary);
    color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    padding: 8px;
    background: transparent;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="file"] {
    padding: 10px;
}

.form-group input[type="color"] {
    height: 50px;
    padding: 5px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

#password-hint {
    font-weight: normal;
    color: var(--text-muted);
    font-size: 12px;
}

/* Экран авторизации */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.login-header .logo svg {
    color: white;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form .btn {
    margin-top: 10px;
}

/* Приложение */
.app {
    display: flex;
    min-height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.logo-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-md);
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: all 0.2s;
    overflow: hidden;
}

.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.user-details {
    min-width: 0;
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.btn-logout {
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.page {
    padding: 24px 32px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Фильтры */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-input {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 200px;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-input::placeholder {
    color: var(--text-muted);
}

.stats-info {
    margin-left: auto;
    display: flex;
    gap: 20px;
}

.stats-info span {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* Темы списка */
.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.topic-chip:hover {
    border-color: var(--primary);
}

.topic-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.topic-chip .color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.topic-chip .count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Список задач */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.task-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.task-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.task-status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.task-status-badge.active {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.task-status-badge.in_progress {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.task-status-badge.testing {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.task-status-badge.resolved {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.task-card-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.task-card-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.task-card-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-card-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.task-card-assignee .avatar {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

/* Администрирование */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    border-color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.admin-tab {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tab-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.users-list,
.topics-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-item,
.topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.user-item-info,
.topic-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-item-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-item-details h3,
.topic-item-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-item-details p,
.topic-item-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

.role-badge.admin {
    background: var(--primary);
    color: white;
}

.topic-color {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
}

.item-actions {
    display: flex;
    gap: 8px;
}

.item-actions button {
    padding: 8px 16px;
    font-size: 13px;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-content.modal-large {
    max-width: 600px;
}

.modal-content.modal-xlarge {
    max-width: 900px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

/* Просмотр задачи */
.task-view-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.task-view-main {
    min-width: 0;
}

.task-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.task-description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 24px;
}

.task-files-section,
.task-comments-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.task-files-section h3,
.task-comments-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.file-item:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.file-item svg {
    flex-shrink: 0;
}

.existing-files {
    margin-top: 10px;
}

/* Комментарии */
.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author .avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.comment-author-info strong {
    display: block;
    font-size: 14px;
}

.comment-author-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.comment-files {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-delete {
    padding: 6px 12px;
    font-size: 12px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.comment-form-actions input[type="file"] {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Сайдбар задачи */
.task-view-sidebar {
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    height: fit-content;
}

.task-info-item {
    margin-bottom: 20px;
}

.task-info-item label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-info-item span {
    font-size: 14px;
    color: var(--text-primary);
}

.task-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.task-actions .filter-select {
    width: 100%;
}

.task-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Уведомления */
.notifications {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.notification.success {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.notification.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Пустые состояния */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .task-view-body {
        grid-template-columns: 1fr;
    }
    
    .task-view-sidebar {
        order: -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .task-info-item {
        margin-bottom: 0;
    }
    
    .task-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        border-top: none;
        padding-top: 0;
    }
    
    .task-actions .filter-select,
    .task-actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page {
        padding: 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn {
        flex: 1;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-info {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content.modal-xlarge {
        max-width: 100%;
    }
}

/* ============ ЛИДЕРБОРД ============ */

.leaderboard-container {
    max-width: 1000px;
}

.leaderboard-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 40px;
    padding: 40px 20px;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.podium-item.place-1 {
    order: 2;
}

.podium-item.place-2 {
    order: 1;
}

.podium-item.place-3 {
    order: 3;
}

.podium-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}

.place-1 .podium-avatar {
    width: 100px;
    height: 100px;
    font-size: 36px;
    background: linear-gradient(135deg, #ffd700, #ffb800);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.place-2 .podium-avatar {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
}

.place-3 .podium-avatar {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.3);
}

.podium-medal {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    border: 3px solid var(--bg-primary);
}

.place-1 .podium-medal {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #000;
}

.place-2 .podium-medal {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #000;
}

.place-3 .podium-medal {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
}

.podium-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.place-1 .podium-name {
    font-size: 18px;
}

.podium-stats {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.podium-prize {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.place-1 .podium-prize {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #000;
}

.place-2 .podium-prize {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #000;
}

.place-3 .podium-prize {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
}

.podium-stand {
    width: 120px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
}

.place-1 .podium-stand {
    height: 100px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.2), var(--bg-secondary));
}

.place-2 .podium-stand {
    height: 70px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.2), var(--bg-secondary));
}

.place-3 .podium-stand {
    height: 50px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.2), var(--bg-secondary));
}

.leaderboard-table-wrapper {
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 16px 20px;
    text-align: left;
}

.leaderboard-table th {
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.leaderboard-table tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table .position {
    font-weight: 700;
    font-size: 18px;
    width: 60px;
}

.leaderboard-table .position.top-1 {
    color: #ffd700;
}

.leaderboard-table .position.top-2 {
    color: #c0c0c0;
}

.leaderboard-table .position.top-3 {
    color: #cd7f32;
}

.leaderboard-table .user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-table .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.leaderboard-table .prize-cell {
    font-weight: 500;
}

.leaderboard-table .prize-cell.gold {
    color: #ffd700;
}

.leaderboard-table .prize-cell.silver {
    color: #c0c0c0;
}

.leaderboard-table .prize-cell.bronze {
    color: #cd7f32;
}

.leaderboard-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.leaderboard-empty svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.leaderboard-empty h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ============ УЧЁТ ВРЕМЕНИ ============ */

.task-time-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.task-time-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.time-total {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 15px;
}

.time-total strong {
    color: var(--primary);
}

.time-logs-list {
    margin-bottom: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.time-log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.time-log-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.time-log-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.time-log-details {
    display: flex;
    flex-direction: column;
}

.time-log-user {
    font-size: 14px;
    font-weight: 500;
}

.time-log-date {
    font-size: 12px;
    color: var(--text-muted);
}

.time-log-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--success);
}

.time-form-container {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.time-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-input-group {
    display: flex;
    gap: 10px;
}

.time-input {
    flex: 1;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
}

.time-input:focus {
    outline: none;
    border-color: var(--primary);
}

.time-input::placeholder {
    color: var(--text-muted);
}

.time-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.time-hint strong {
    color: var(--text-secondary);
}

/* ============ НОВЫЙ ИНТЕРФЕЙС ВВОДА ВРЕМЕНИ ============ */

.time-picker-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.time-picker-single {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.time-picker-single > label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.time-picker-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-picker-group label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.time-picker-input {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
}

.time-picker-input:focus {
    outline: none;
    border-color: var(--primary);
}

.time-spinner-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.time-spinner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.time-spinner label {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.time-spinner-select {
    width: 70px;
    padding: 12px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.time-spinner-select:focus {
    outline: none;
    border-color: var(--primary);
}

.time-spinner-separator {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 12px;
}

/* ============ КАЛЕНДАРЬ ============ */

.calendar-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.calendar-header h2 {
    font-size: 20px;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekdays div {
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    min-height: 100px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: var(--border-light);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.today {
    border: 2px solid var(--primary);
}

.calendar-day.has-entries {
    background: rgba(99, 102, 241, 0.1);
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-day-hours {
    font-size: 11px;
    font-weight: 500;
    color: var(--success);
    background: rgba(34, 197, 94, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.calendar-day-entries {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.calendar-entry {
    font-size: 10px;
    padding: 4px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.calendar-entry-time {
    font-weight: 600;
    margin-right: 4px;
}

.calendar-day-details {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.calendar-day-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.day-entries {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-entry-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.day-entry-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}

.day-entry-info {
    flex: 1;
}

.day-entry-task {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.day-entry-duration {
    font-size: 13px;
    color: var(--text-secondary);
}

.day-entry-topic {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
}

.calendar-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.calendar-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ============ АДАПТИВНЫЙ ДИЗАЙН ============ */

/* Большие экраны (ноутбуки) */
@media (max-width: 1280px) {
    .page {
        padding: 20px 24px;
    }
    
    .modal-content.modal-xlarge {
        max-width: 95%;
    }
    
    .leaderboard-podium {
        gap: 16px;
        padding: 30px 16px;
    }
    
    .podium-item.place-1 .podium-avatar {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
    
    .podium-avatar {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
}

/* Планшеты */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .task-view-body {
        grid-template-columns: 1fr;
    }
    
    .task-view-sidebar {
        order: -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .task-info-item {
        margin-bottom: 0;
    }
    
    .task-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        border-top: none;
        padding-top: 0;
    }
    
    .task-actions .filter-select,
    .task-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .calendar-day-entries {
        display: none;
    }
    
    .time-picker-row {
        grid-template-columns: 1fr;
    }
    
    .filters-bar {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .stats-info {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* Маленькие планшеты и большие телефоны */
@media (max-width: 900px) {
    .calendar-day {
        min-height: 60px;
    }
    
    .calendar-day-number {
        font-size: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .calendar-day-hours {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .calendar-header h2 {
        font-size: 16px;
        min-width: 160px;
    }
    
    .day-entry-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .day-entry-time {
        min-width: auto;
    }
    
    .leaderboard-podium {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .podium-stand {
        width: 80px;
    }
    
    .place-1 .podium-stand {
        height: 70px;
    }
    
    .place-2 .podium-stand {
        height: 50px;
    }
    
    .place-3 .podium-stand {
        height: 35px;
    }
}

/* Телефоны в ландшафте и маленькие планшеты */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page {
        padding: 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .header-actions .btn {
        flex: 1;
        min-width: 140px;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }
    
    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .filter-select,
    .filter-input {
        width: 100%;
        min-width: auto;
    }
    
    .stats-info {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content.modal-xlarge {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal {
        padding: 0;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
    
    .user-item,
    .topic-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .item-actions {
        width: 100%;
    }
    
    .item-actions button {
        flex: 1;
    }
    
    /* Календарь на телефоне */
    .calendar-container {
        padding: 16px;
    }
    
    .calendar-header {
        gap: 10px;
    }
    
    .calendar-header h2 {
        font-size: 14px;
        min-width: auto;
    }
    
    .calendar-header .btn {
        padding: 8px;
    }
    
    .calendar-weekdays div {
        padding: 6px 2px;
        font-size: 10px;
    }
    
    .calendar-day {
        min-height: 45px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 11px;
    }
    
    .calendar-day-hours {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    /* Лидерборд на телефоне */
    .leaderboard-podium {
        padding: 20px 10px;
        gap: 8px;
    }
    
    .podium-avatar {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .place-1 .podium-avatar {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
    
    .podium-medal {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .podium-name {
        font-size: 12px;
    }
    
    .place-1 .podium-name {
        font-size: 14px;
    }
    
    .podium-stats {
        font-size: 10px;
    }
    
    .podium-prize {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .podium-stand {
        width: 60px;
    }
    
    .place-1 .podium-stand {
        height: 50px;
    }
    
    .place-2 .podium-stand {
        height: 35px;
    }
    
    .place-3 .podium-stand {
        height: 25px;
    }
    
    /* Таблица лидерборда */
    .leaderboard-table th:nth-child(4),
    .leaderboard-table td:nth-child(4),
    .leaderboard-table th:nth-child(5),
    .leaderboard-table td:nth-child(5) {
        display: none;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .leaderboard-table .position {
        font-size: 14px;
        width: 40px;
    }
    
    .leaderboard-table .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    /* Задачи на телефоне */
    .task-card {
        padding: 14px;
    }
    
    .task-card-title {
        font-size: 14px;
    }
    
    .task-card-description {
        font-size: 13px;
    }
    
    .task-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .task-card-info {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* Комментарии */
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comment-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .comment-form-actions input[type="file"],
    .comment-form-actions .btn {
        width: 100%;
    }
    
    /* Форма времени */
    .time-spinner-container {
        justify-content: center;
    }
    
    .time-spinner-select {
        width: 60px;
        padding: 10px 6px;
        font-size: 16px;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .login-container {
        padding: 24px 20px;
        margin: 10px;
    }
    
    .login-header .logo {
        width: 60px;
        height: 60px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .page-header h1 {
        font-size: 18px;
    }
    
    .header-actions .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* НЕ скрываем текст кнопок - он нужен */
    .header-actions .btn span {
        display: inline;
        font-size: 12px;
    }
    
    .btn-toggle span {
        display: inline;
        font-size: 12px;
    }
    
    .calendar-day {
        min-height: 38px;
        padding: 3px;
    }
    
    .calendar-day-number {
        font-size: 10px;
    }
    
    .calendar-day-hours {
        display: none;
    }
    
    .calendar-weekdays div {
        font-size: 9px;
        padding: 4px 2px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .task-view-sidebar {
        grid-template-columns: 1fr 1fr;
    }
    
    .task-actions {
        flex-direction: column;
    }
    
    .task-actions .filter-select,
    .task-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    /* Скрываем призы в таблице на очень маленьких экранах */
    .leaderboard-table th:nth-child(6),
    .leaderboard-table td:nth-child(6) {
        display: none;
    }
    
    .leaderboard-table .user-cell span {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .notifications {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .notification {
        max-width: 100%;
    }
}

/* Кнопка меню для мобильных */
.mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Оверлей для мобильного меню */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .nav-item {
        min-height: 48px;
    }
    
    .task-card {
        padding: 16px;
    }
    
    .filter-select,
    .filter-input {
        min-height: 44px;
    }
    
    .calendar-day {
        min-height: 50px;
    }
}

/* Ориентация ландшафт на телефонах */
@media (max-width: 900px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
    }
    
    .calendar-day {
        min-height: 40px;
    }
    
    .leaderboard-podium {
        padding: 16px;
    }
    
    .podium-stand {
        display: none;
    }
}

/* ============ ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ============ */

/* Предотвращаем зум при фокусе на input (iOS требует font-size >= 16px) */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px !important;
    }
    
    .filter-select,
    .filter-input {
        font-size: 16px !important;
    }
    
    .comment-form textarea {
        font-size: 16px !important;
    }
    
    .time-spinner-select {
        font-size: 16px !important;
    }
    
    /* Модальное окно на мобильных - полный экран */
    .modal-content.modal-xlarge {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    /* Фиксированный заголовок модалки */
    .modal-content.modal-xlarge .modal-header {
        position: sticky;
        top: 0;
        background: var(--bg-card);
        z-index: 10;
        flex-shrink: 0;
        padding: 12px 16px;
    }
    
    /* Кнопка закрытия всегда видна */
    .modal-content.modal-xlarge .modal-close {
        width: 40px;
        height: 40px;
        font-size: 28px;
        background: var(--bg-tertiary);
        flex-shrink: 0;
    }
    
    /* Скроллящееся тело модалки */
    .modal-content.modal-xlarge .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        padding-bottom: 100px; /* Место для формы комментария */
    }
    
    /* Task view на мобильных */
    .task-view-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    /* Форма комментария внизу на мобильных */
    .task-comments-section {
        padding-bottom: 20px;
    }
    
    .comment-form {
        background: var(--bg-secondary);
        padding: 12px;
        border-radius: var(--radius-md);
        margin-top: 16px;
    }
    
    .comment-form textarea {
        min-height: 60px;
    }
    
    .comment-form-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
    }
    
    .comment-form-actions .btn {
        width: 100%;
        padding: 12px;
    }
}

/* Фикс для очень маленьких экранов */
@media (max-width: 380px) {
    .header-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .header-actions .btn {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }
    
    .task-view-sidebar {
        grid-template-columns: 1fr;
    }
    
    .modal-header h2 {
        font-size: 14px;
        max-width: 70%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
