/* Módulo de Checklist Integrado - Laticínios Porto Alegre */
.mode-switcher {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    background: #ffffff;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.mode-switch-btn {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mode-switch-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(26, 60, 110, 0.25);
}

.checklist-stepper {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.checklist-step-btn {
    flex: 1;
    min-width: 140px;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.checklist-step-btn.active {
    background: #eff6ff;
    border-color: var(--accent);
    color: var(--primary);
}

.checklist-step-btn.done {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.checklist-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.checklist-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0 10px;
}

.checklist-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    transition: width 0.25s ease;
}

.checklist-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.checklist-stat-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--text-main);
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

.checklist-stat-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.checklist-item-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.checklist-item-card.status-c {
    border-left: 4px solid var(--success);
}

.checklist-item-card.status-nc {
    border-left: 4px solid var(--danger);
    background: #fef2f2;
}

.checklist-item-card.status-na {
    border-left: 4px solid #9ca3af;
    background: #f9fafb;
}

.checklist-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.checklist-item-num {
    display: inline-block;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #e0e7ff;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: 6px;
    margin-right: 6px;
}

.checklist-tri-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.checklist-tri-btn {
    flex: 1;
    min-width: 90px;
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-main);
}

.checklist-tri-btn.active-c {
    background: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

.checklist-tri-btn.active-nc {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.checklist-tri-btn.active-na {
    background: #6b7280;
    color: #ffffff;
    border-color: #6b7280;
}

.checklist-nc-box {
    margin-top: 10px;
    padding: 10px;
    background: #ffffff;
    border: 1px dashed #fca5a5;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-nc-box label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 2px;
    display: block;
}

.checklist-nc-box input,
.checklist-nc-box select,
.checklist-nc-box textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.82rem;
}

.checklist-photo-preview {
    max-width: 120px;
    max-height: 90px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    object-fit: cover;
    margin-top: 4px;
}

.badge-checklist {
    display: inline-block;
    background: #e0e7ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 4px;
}

.checklist-model-editor-item {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

.checklist-model-editor-item input {
    flex: 1;
    padding: 7px 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.82rem;
}

.checklist-history-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.checklist-report-modal-box {
    background: #ffffff;
    width: 95%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

@media print {
    body.printing-checklist > *:not(#modalChecklistPreview) {
        display: none !important;
    }
    body.printing-checklist #modalChecklistPreview {
        position: static !important;
        background: #ffffff !important;
        display: block !important;
        padding: 0 !important;
    }
    body.printing-checklist .checklist-no-print {
        display: none !important;
    }
}
