/* frontend/css/checklists.css */
.checklists-container {
    animation: fadeIn 0.3s ease;
}

/* Сетка чек-листов */
.checklists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Карточка чек-листа */
.checklist-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.checklist-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.checklist-card-header {
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.checklist-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.checklist-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-draft {
    background: #fff3e0;
    color: #e65100;
}

.status-archived {
    background: #f5f5f5;
    color: var(--text-gray);
}

.checklist-card-body {
    padding: 16px 20px;
}

.checklist-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-gray);
}

.checklist-meta i {
    width: 16px;
    margin-right: 6px;
    color: var(--primary-color);
}

.checklist-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
}

.checklist-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
}

.checklist-stats i {
    font-size: 14px;
}

.checklist-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    display: flex;
    gap: 8px;
}

/* Дерево чек-листа */
.checklist-tree {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.tree-node {
    margin-left: 0;
    list-style: none;
}

.tree-node-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.tree-node-content:hover {
    background: var(--bg-light);
}

.tree-node-content .toggle-icon {
    width: 20px;
    cursor: pointer;
    color: var(--text-gray);
    flex-shrink: 0;
}

.tree-node-content .node-icon {
    width: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.tree-node-content .node-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark);
}

.tree-node-content .node-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--bg-gray);
    color: var(--text-gray);
    flex-shrink: 0;
}

.tree-node-children {
    margin-left: 32px;
    display: none;
}

.tree-node-children.expanded {
    display: block;
}

/* Типы узлов */
.node-requirement {
    font-weight: 600;
    color: var(--primary-dark);
}

.node-criterion {
    font-weight: 500;
}

.node-component {
    padding-left: 8px;
}

/* Информация о чек-листе */
.checklist-info {
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.checklist-info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}

.checklist-info-label {
    width: 140px;
    font-weight: 600;
    color: var(--text-gray);
}

.checklist-info-value {
    flex: 1;
    color: var(--text-dark);
}

/* Предпросмотр импорта */
.preview-info {
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    padding: 16px;
}

.preview-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.preview-stat:last-child {
    border-bottom: none;
}

.preview-stat-label {
    font-weight: 500;
    color: var(--text-gray);
}

.preview-stat-value {
    font-weight: 600;
    color: var(--text-dark);
}

.preview-warning {
    background: #fff3e0;
    color: #e65100;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
}

/* Добавьте в конец файла checklists.css */
.btn-icon.edit-checklist:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.empty-state-small {
    text-align: center;
    padding: 20px;
    color: var(--text-gray);
    font-size: 13px;
}

.btn-outline.excel:hover {
    background: #1d6f42 !important;
    color: white !important;
    border-color: #1d6f42 !important;
}

.btn-outline.pdf:hover {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* Стили для быстрого перехода к аналитике */
.btn-icon.view-checklist-analytics:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.normative-ref-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.documents-badge {
    background: #d1fae5;
    color: #065f46;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Модальное окно выбора параметров */
#reportParamsModal .form-group {
    margin-bottom: 16px;
}

#reportParamsModal label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

#reportParamsModal select,
#reportParamsModal input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    box-sizing: border-box;
}

#reportParamsModal select:focus,
#reportParamsModal input:focus {
    outline: none;
    border-color: var(--primary-color);
}


/* Адаптивность */
@media (max-width: 768px) {
    .checklists-grid {
        grid-template-columns: 1fr;
    }

    .checklist-info-row {
        flex-direction: column;
    }

    .checklist-info-label {
        width: 100%;
        margin-bottom: 4px;
    }

    .tree-node-children {
        margin-left: 16px;
    }
}