/**
 * Дополнительные стили для темы Zenith Kanban
 */

/* Стили для мобильного меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 40px;
    height: 40px;
}

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
    background: var(--text-primary);
    border-radius: 2px;
    content: '';
    display: block;
    height: 3px;
    position: absolute;
    transition: all 0.3s ease;
    width: 24px;
}

.menu-toggle-icon {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.menu-toggle-icon::before {
    top: -8px;
    left: 0;
}

.menu-toggle-icon::after {
    bottom: -8px;
    left: 0;
}

/* Активное состояние мобильного меню */
.toggled-on .menu-toggle-icon {
    background: transparent;
}

.toggled-on .menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.toggled-on .menu-toggle-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Стили для навигации на мобильных устройствах */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: var(--shadow-md);
        z-index: 1000;
    }
    
    .main-navigation.toggled-on ul {
        display: flex;
    }
    
    .main-navigation li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 20px;
    }
}

/* Стили для фокуса на пунктах меню */
.main-navigation .focused > a {
    background: var(--brand-light);
}

/* Стили для кнопок */
.button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-primary {
    background-color: var(--brand-primary);
    color: #fff;
}

.button-primary:hover {
    background-color: #3a7bc8;
}

.button-secondary {
    background-color: var(--brand-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.button-secondary:hover {
    background-color: #e5e7eb;
}

/* Стили для форм */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Стили для таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--brand-light);
    font-weight: 600;
}

/* Стили для уведомлений */
.notice {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.notice-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.notice-error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

.notice-warning {
    background-color: #fff8e1;
    border-left: 4px solid #ff9800;
    color: #f57c00;
}

.notice-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

/* Стили для пагинации */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
}

.pagination .page-numbers.current {
    background-color: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.pagination .page-numbers:hover {
    background-color: var(--brand-light);
}

/* Стили для виджетов */
.widget {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.widget li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget a {
    color: var(--brand-primary);
    text-decoration: none;
}

.widget a:hover {
    text-decoration: underline;
}

/* Стили для Kanban доски */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem;
    min-height: 600px;
}

/* Стили для колонок Kanban доски */
.kanban-column {
    flex: 0 0 320px;
    background: #f8fafc;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.kanban-column-header {
    padding: 1rem;
    border-bottom: 4px solid;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin: 0;
}

.kanban-column-count {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.kanban-tasks {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Стили для карточек задач */
.kanban-task {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid;
}

.kanban-task:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kanban-task-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.kanban-task-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.kanban-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kanban-task-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kanban-task-date.overdue {
    color: #ef4444;
    font-weight: 600;
}

.kanban-task-assignee {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
}

/* Стили для приоритетов задач */
.kanban-task.priority-urgent {
    border-left-color: #ef4444;
}

.kanban-task.priority-high {
    border-left-color: #f97316;
}

.kanban-task.priority-medium {
    border-left-color: #eab308;
}

.kanban-task.priority-low {
    border-left-color: #3b82f6;
}

/* Стили для статусов колонок */
.kanban-column.status-backlog .kanban-column-header {
    border-bottom-color: #95a5a6;
}

.kanban-column.status-todo .kanban-column-header {
    border-bottom-color: #3498db;
}

.kanban-column.status-in-progress .kanban-column-header {
    border-bottom-color: #f39c12;
}

.kanban-column.status-review .kanban-column-header {
    border-bottom-color: #9b59b6;
}

.kanban-column.status-done .kanban-column-header {
    border-bottom-color: #2ecc71;
}

/* Стили для перетаскивания */
.kanban-task.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.kanban-column.drag-over {
    background-color: var(--brand-primary-light);
}

/* Стили для модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background-color: var(--brand-light);
}

/* Адаптивность для Kanban доски */
@media (max-width: 768px) {
    .kanban-board {
        flex-direction: column;
        gap: 1rem;
    }
    
    .kanban-column {
        flex: 1;
        width: 100%;
        max-height: none;
    }
    
    .modal {
        max-width: 100%;
        margin: 1rem;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-backdrop {
    animation: fadeInBackdrop 0.2s ease-out;
}

/* Стили интеграции с плагином Zenith Kanban */
.zenith-kanban-enhanced {
    position: relative;
}

.zenith-kanban-quick-filters-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.zenith-kanban-quick-filter {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zenith-kanban-quick-filter:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.zenith-kanban-quick-filter.active {
    background: var(--brand-primary, #4a90e2);
    color: #fff;
    border-color: var(--brand-primary, #4a90e2);
}

.zenith-kanban-quick-filter.reset {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.zenith-kanban-quick-filter.reset:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.zenith-kanban-notice {
    margin-bottom: 20px;
}

/* Стили для карточек задач в архивах */
.task-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #e9ecef;
    transition: all 0.2s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.task-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.task-card-title a {
    color: inherit;
    text-decoration: none;
}

.task-card-title a:hover {
    color: var(--brand-primary);
}

.task-card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.task-status, .task-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-status.status-backlog {
    background: #e9ecef;
    color: #495057;
}

.task-status.status-todo {
    background: #d1ecf1;
    color: #0c5460;
}

.task-status.status-in-progress {
    background: #fff3cd;
    color: #856404;
}

.task-status.status-review {
    background: #e2e3e5;
    color: #383d41;
}

.task-status.status-done {
    background: #d4edda;
    color: #155724;
}

.task-priority.priority-urgent {
    background: #f8d7da;
    color: #721c24;
}

.task-priority.priority-high {
    background: #f5c6cb;
    color: #721c24;
}

.task-priority.priority-medium {
    background: #fff3cd;
    color: #856404;
}

.task-priority.priority-low {
    background: #d1ecf1;
    color: #0c5460;
}

.task-card-content {
    margin-bottom: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assignee-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.assignee-name {
    font-weight: 500;
}

.task-project a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.task-project a:hover {
    text-decoration: underline;
}

.task-deadline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-deadline.overdue {
    color: #dc3545;
    font-weight: 600;
}

/* Стили для карточек проектов в архивах */
.project-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.project-card-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.project-card-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.project-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.project-card-title a {
    color: inherit;
    text-decoration: none;
}

.project-card-title a:hover {
    color: var(--brand-primary);
}

.project-card-meta {
    margin-bottom: 15px;
}

.project-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status.status-planning {
    background: #e9ecef;
    color: #495057;
}

.project-status.status-active {
    background: #d4edda;
    color: #155724;
}

.project-status.status-on-hold {
    background: #fff3cd;
    color: #856404;
}

.project-status.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.project-status.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.project-card-content {
    margin-bottom: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.project-date, .project-budget {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-muted);
}

.project-date.overdue {
    color: #dc3545;
    font-weight: 600;
}

.project-progress {
    width: 100%;
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--brand-primary, #4a90e2);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.project-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.project-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Стили для архивов */
.archive-filters {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.task-filters-form {
    margin: 0;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.archive-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.task-archive-grid, .project-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.no-posts {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.no-posts p {
    margin: 0 0 15px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Стили для отдельных записей */
.zenith-task-single, .zenith-project-single {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin-bottom: 30px;
}

.entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.entry-title {
    margin: 0 0 20px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.task-meta, .project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.task-meta > div, .project-meta > div {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.task-meta .label, .project-meta .label {
    font-weight: 500;
    color: var(--text-muted);
}

.task-meta .value, .project-meta .value {
    font-weight: 600;
    color: var(--text-primary);
}

.task-actions, .project-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.project-tasks-section, .project-stats-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.project-tasks-section h2, .project-stats-section h2 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.project-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.project-task-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border-left: 3px solid #e9ecef;
}

.project-task-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.project-task-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.project-task-card h3 a:hover {
    color: var(--brand-primary);
}

.project-tasks-footer {
    text-align: center;
    margin-top: 20px;
}

.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

/* Адаптивность */
@media (max-width: 768px) {
    .zenith-kanban-quick-filters-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .task-archive-grid, .project-archive-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .task-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .task-meta, .project-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-actions, .project-actions {
        flex-direction: column;
    }
    
    .zenith-task-single, .zenith-project-single {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 24px;
    }
}